home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / lib / python2.6 / decimal.pyc < prev    next >
Unknown  |  2009-11-11  |  150.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Python Compiled Bytecode (document/pythonCompiled) magic Supported
100% file python 2.6 byte-compiled default
99% file data default
57% TrID CPython 2.6 bytecode default
42% TrID Python optimized code default
100% detectItEasy Format: Python Compiled Module(2.6a1) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| d1 f2 0d 0a 52 f9 ee 4a | 63 00 00 00 00 00 00 00 |....R..J|c.......|
|00000010| 00 20 00 00 00 40 00 00 | 00 73 41 07 00 00 64 00 |. ...@..|.sA...d.|
|00000020| 00 5a 00 00 64 01 00 64 | 02 00 64 03 00 64 04 00 |.Z..d..d|..d..d..|
|00000030| 64 05 00 64 06 00 64 07 | 00 64 08 00 64 09 00 64 |d..d..d.|.d..d..d|
|00000040| 0a 00 64 0b 00 64 0c 00 | 64 0d 00 64 0e 00 64 0f |..d..d..|d..d..d.|
|00000050| 00 64 10 00 64 11 00 64 | 12 00 64 13 00 64 14 00 |.d..d..d|..d..d..|
|00000060| 64 15 00 64 16 00 64 17 | 00 64 18 00 64 19 00 67 |d..d..d.|.d..d..g|
|00000070| 19 00 5a 01 00 64 1a 00 | 64 1b 00 6b 02 00 5a 03 |..Z..d..|d..k..Z.|
|00000080| 00 64 1a 00 64 1b 00 6b | 04 00 5a 05 00 79 23 00 |.d..d..k|..Z..y#.|
|00000090| 64 1a 00 64 1c 00 6b 06 | 00 6c 07 00 5a 08 00 01 |d..d..k.|.l..Z...|
|000000a0| 65 08 00 64 1d 00 64 1e | 00 83 02 00 5a 09 00 57 |e..d..d.|....Z..W|
|000000b0| 6e 1c 00 04 65 0a 00 6a | 0a 00 6f 10 00 01 01 01 |n...e..j|..o.....|
|000000c0| 01 64 1f 00 84 00 00 5a | 09 00 6e 02 00 01 58 64 |.d.....Z|..n...Xd|
|000000d0| 0f 00 5a 0b 00 64 10 00 | 5a 0c 00 64 11 00 5a 0d |..Z..d..|Z..d..Z.|
|000000e0| 00 64 12 00 5a 0e 00 64 | 13 00 5a 0f 00 64 14 00 |.d..Z..d|..Z..d..|
|000000f0| 5a 10 00 64 15 00 5a 11 | 00 64 16 00 5a 12 00 64 |Z..d..Z.|.d..Z..d|
|00000100| 06 00 65 13 00 66 01 00 | 64 20 00 84 00 00 83 00 |..e..f..|d ......|
|00000110| 00 59 5a 14 00 64 07 00 | 65 14 00 66 01 00 64 21 |.YZ..d..|e..f..d!|
|00000120| 00 84 00 00 83 00 00 59 | 5a 15 00 64 08 00 65 14 |.......Y|Z..d..e.|
|00000130| 00 66 01 00 64 22 00 84 | 00 00 83 00 00 59 5a 16 |.f..d"..|.....YZ.|
|00000140| 00 64 23 00 65 16 00 66 | 01 00 64 24 00 84 00 00 |.d#.e..f|..d$....|
|00000150| 83 00 00 59 5a 17 00 64 | 09 00 65 14 00 65 18 00 |...YZ..d|..e..e..|
|00000160| 66 02 00 64 25 00 84 00 | 00 83 00 00 59 5a 19 00 |f..d%...|....YZ..|
|00000170| 64 26 00 65 16 00 66 01 | 00 64 27 00 84 00 00 83 |d&.e..f.|.d'.....|
|00000180| 00 00 59 5a 1a 00 64 28 | 00 65 16 00 65 18 00 66 |..YZ..d(|.e..e..f|
|00000190| 02 00 64 29 00 84 00 00 | 83 00 00 59 5a 1b 00 64 |..d)....|...YZ..d|
|000001a0| 0a 00 65 14 00 66 01 00 | 64 2a 00 84 00 00 83 00 |..e..f..|d*......|
|000001b0| 00 59 5a 1c 00 64 2b 00 | 65 16 00 66 01 00 64 2c |.YZ..d+.|e..f..d,|
|000001c0| 00 84 00 00 83 00 00 59 | 5a 1d 00 64 0b 00 65 14 |.......Y|Z..d..e.|
|000001d0| 00 66 01 00 64 2d 00 84 | 00 00 83 00 00 59 5a 1e |.f..d-..|.....YZ.|
|000001e0| 00 64 0c 00 65 14 00 66 | 01 00 64 2e 00 84 00 00 |.d..e..f|..d.....|
|000001f0| 83 00 00 59 5a 1f 00 64 | 0d 00 65 1c 00 65 1e 00 |...YZ..d|..e..e..|
|00000200| 66 02 00 64 2f 00 84 00 | 00 83 00 00 59 5a 20 00 |f..d/...|....YZ .|
|00000210| 64 0e 00 65 1c 00 65 1e | 00 65 1f 00 66 03 00 64 |d..e..e.|.e..f..d|
|00000220| 30 00 84 00 00 83 00 00 | 59 5a 21 00 65 15 00 65 |0.......|YZ!.e..e|
|00000230| 19 00 65 1c 00 65 20 00 | 65 1e 00 65 21 00 65 16 |..e..e .|e..e!.e.|
|00000240| 00 65 1f 00 67 08 00 5a | 22 00 68 04 00 65 16 00 |.e..g..Z|".h..e..|
|00000250| 65 17 00 36 65 16 00 65 | 1a 00 36 65 16 00 65 1b |e..6e..e|..6e..e.|
|00000260| 00 36 65 16 00 65 1d 00 | 36 5a 23 00 79 10 00 64 |.6e..e..|6Z#.y..d|
|00000270| 1a 00 64 1b 00 6b 24 00 | 5a 24 00 57 6e 44 00 04 |..d..k$.|Z$.WnD..|
|00000280| 65 0a 00 6a 0a 00 6f 38 | 00 01 01 01 01 64 1a 00 |e..j..o8|.....d..|
|00000290| 64 1b 00 6b 25 00 5a 25 | 00 64 31 00 65 26 00 66 |d..k%.Z%|.d1.e&.f|
|000002a0| 01 00 64 32 00 84 00 00 | 83 00 00 59 5a 27 00 65 |..d2....|...YZ'.e|
|000002b0| 27 00 83 00 00 5a 24 00 | 5b 25 00 5b 27 00 6e 02 |'....Z$.|[%.['.n.|
|000002c0| 00 01 58 79 0b 00 65 24 | 00 69 28 00 01 57 6e 4b |..Xy..e$|.i(..WnK|
|000002d0| 00 04 65 29 00 6a 0a 00 | 6f 3f 00 01 01 01 01 65 |..e).j..|o?.....e|
|000002e0| 2a 00 65 24 00 69 2b 00 | 83 00 00 64 33 00 83 02 |*.e$.i+.|...d3...|
|000002f0| 00 6f 10 00 01 65 24 00 | 69 2b 00 83 00 00 60 2c |.o...e$.|i+....`,|
|00000300| 00 6e 01 00 01 64 34 00 | 84 00 00 5a 2d 00 64 35 |.n...d4.|...Z-.d5|
|00000310| 00 84 00 00 5a 2e 00 6e | 46 00 01 58 65 24 00 69 |....Z..n|F..Xe$.i|
|00000320| 28 00 83 00 00 5a 28 00 | 65 2a 00 65 28 00 64 33 |(....Z(.|e*.e(.d3|
|00000330| 00 83 02 00 6f 0a 00 01 | 65 28 00 60 2c 00 6e 01 |....o...|e(.`,.n.|
|00000340| 00 01 65 28 00 64 36 00 | 84 01 00 5a 2e 00 65 28 |..e(.d6.|...Z..e(|
|00000350| 00 64 37 00 84 01 00 5a | 2d 00 5b 24 00 5b 28 00 |.d7....Z|-.[$.[(.|
|00000360| 65 2f 00 64 38 00 84 01 | 00 5a 30 00 64 01 00 65 |e/.d8...|.Z0.d..e|
|00000370| 26 00 66 01 00 64 39 00 | 84 00 00 83 00 00 59 5a |&.f..d9.|......YZ|
|00000380| 31 00 65 32 00 64 3a 00 | 84 01 00 5a 33 00 65 05 |1.e2.d:.|...Z3.e.|
|00000390| 00 69 34 00 69 35 00 65 | 31 00 83 01 00 01 67 00 |.i4.i5.e|1.....g.|
|000003a0| 00 04 5a 36 00 65 31 00 | 69 37 00 69 38 00 83 00 |..Z6.e1.|i7.i8...|
|000003b0| 00 44 5d 21 00 5a 39 00 | 65 39 00 69 3a 00 64 3b |.D]!.Z9.|e9.i:.d;|
|000003c0| 00 83 01 00 6f 0b 00 01 | 65 36 00 65 39 00 12 6e |....o...|e6.e9..n|
|000003d0| 01 00 01 71 94 03 5b 36 | 00 5a 3b 00 78 38 00 65 |...q..[6|.Z;.x8.e|
|000003e0| 3b 00 44 5d 30 00 5a 39 | 00 65 39 00 64 3c 00 1f |;.D]0.Z9|.e9.d<..|
|000003f0| 69 3c 00 83 00 00 5a 3d | 00 65 3e 00 83 00 00 65 |i<....Z=|.e>....e|
|00000400| 3d 00 19 5a 3f 00 65 39 | 00 65 31 00 69 40 00 65 |=..Z?.e9|.e1.i@.e|
|00000410| 3f 00 3c 71 c5 03 57 5b | 39 00 5b 3f 00 5b 3d 00 |?.<q..W[|9.[?.[=.|
|00000420| 5b 3b 00 64 3d 00 65 26 | 00 66 01 00 64 3e 00 84 |[;.d=.e&|.f..d>..|
|00000430| 00 00 83 00 00 59 5a 41 | 00 64 02 00 65 26 00 66 |.....YZA|.d..e&.f|
|00000440| 01 00 64 3f 00 84 00 00 | 83 00 00 59 5a 42 00 64 |..d?....|...YZB.d|
|00000450| 40 00 65 26 00 66 01 00 | 64 41 00 84 00 00 83 00 |@.e&.f..|dA......|
|00000460| 00 59 5a 43 00 64 42 00 | 64 43 00 84 01 00 5a 44 |.YZC.dB.|dC....ZD|
|00000470| 00 68 10 00 64 44 00 64 | 45 00 36 64 46 00 64 47 |.h..dD.d|E.6dF.dG|
|00000480| 00 36 64 48 00 64 49 00 | 36 64 48 00 64 4a 00 36 |.6dH.dI.|6dH.dJ.6|
|00000490| 64 3c 00 64 4b 00 36 64 | 3c 00 64 4c 00 36 64 3c |d<.dK.6d|<.dL.6d<|
|000004a0| 00 64 4d 00 36 64 3c 00 | 64 4e 00 36 64 42 00 64 |.dM.6d<.|dN.6dB.d|
|000004b0| 4f 00 36 64 42 00 64 50 | 00 36 64 42 00 64 51 00 |O.6dB.dP|.6dB.dQ.|
|000004c0| 36 64 42 00 64 52 00 36 | 64 42 00 64 53 00 36 64 |6dB.dR.6|dB.dS.6d|
|000004d0| 42 00 64 54 00 36 64 42 | 00 64 55 00 36 64 42 00 |B.dT.6dB|.dU.6dB.|
|000004e0| 64 56 00 36 64 57 00 84 | 01 00 5a 45 00 64 58 00 |dV.6dW..|..ZE.dX.|
|000004f0| 84 00 00 5a 46 00 64 59 | 00 84 00 00 5a 47 00 64 |...ZF.dY|....ZG.d|
|00000500| 5a 00 84 00 00 5a 48 00 | 64 5b 00 64 5c 00 84 01 |Z....ZH.|d[.d\...|
|00000510| 00 5a 49 00 64 5d 00 84 | 00 00 5a 4a 00 64 5e 00 |.ZI.d]..|..ZJ.d^.|
|00000520| 84 00 00 5a 4b 00 64 5f | 00 65 26 00 66 01 00 64 |...ZK.d_|.e&.f..d|
|00000530| 60 00 84 00 00 83 00 00 | 59 5a 4c 00 65 4c 00 83 |`.......|YZL.eL..|
|00000540| 00 00 69 4d 00 5a 4e 00 | 64 5b 00 64 61 00 84 01 |..iM.ZN.|d[.da...|
|00000550| 00 5a 4f 00 64 62 00 84 | 00 00 5a 50 00 64 63 00 |.ZO.db..|..ZP.dc.|
|00000560| 84 00 00 5a 51 00 68 09 | 00 64 64 00 64 47 00 36 |...ZQ.h.|.dd.dG.6|
|00000570| 64 65 00 64 49 00 36 64 | 66 00 64 4a 00 36 64 67 |de.dI.6d|f.dJ.6dg|
|00000580| 00 64 4b 00 36 64 68 00 | 64 4c 00 36 64 69 00 64 |.dK.6dh.|dL.6di.d|
|00000590| 4d 00 36 64 6a 00 64 4e | 00 36 64 6b 00 64 4f 00 |M.6dj.dN|.6dk.dO.|
|000005a0| 36 64 6c 00 64 50 00 36 | 64 6d 00 84 01 00 5a 52 |6dl.dP.6|dm....ZR|
|000005b0| 00 65 32 00 64 6e 00 84 | 01 00 5a 53 00 65 42 00 |.e2.dn..|..ZS.eB.|
|000005c0| 64 6f 00 64 70 00 64 71 | 00 65 0d 00 64 72 00 65 |do.dp.dq|.e..dr.e|
|000005d0| 19 00 65 20 00 65 16 00 | 67 03 00 64 73 00 67 00 |..e .e..|g..ds.g.|
|000005e0| 00 64 74 00 64 75 00 64 | 76 00 64 77 00 64 78 00 |.dt.du.d|v.dw.dx.|
|000005f0| 64 3c 00 83 00 07 5a 54 | 00 65 42 00 64 6f 00 64 |d<....ZT|.eB.do.d|
|00000600| 79 00 64 71 00 65 0c 00 | 64 72 00 65 19 00 65 20 |y.dq.e..|dr.e..e |
|00000610| 00 65 16 00 65 15 00 65 | 21 00 67 05 00 64 73 00 |.e..e..e|!.g..ds.|
|00000620| 67 00 00 83 00 04 5a 55 | 00 65 42 00 64 6f 00 64 |g.....ZU|.eB.do.d|
|00000630| 79 00 64 71 00 65 0d 00 | 64 72 00 67 00 00 64 73 |y.dq.e..|dr.g..ds|
|00000640| 00 67 00 00 83 00 04 5a | 56 00 64 1a 00 64 1b 00 |.g.....Z|V.d..d..|
|00000650| 6b 57 00 5a 57 00 65 57 | 00 69 58 00 64 7a 00 65 |kW.ZW.eW|.iX.dz.e|
|00000660| 57 00 69 59 00 65 57 00 | 69 5a 00 42 65 57 00 69 |W.iY.eW.|iZ.BeW.i|
|00000670| 5b 00 42 83 02 00 69 5c | 00 5a 5d 00 65 57 00 69 |[.B...i\|.Z].eW.i|
|00000680| 58 00 64 7b 00 83 01 00 | 69 5c 00 5a 5e 00 65 57 |X.d{....|i\.Z^.eW|
|00000690| 00 69 58 00 64 7c 00 83 | 01 00 69 5c 00 5a 5f 00 |.iX.d|..|..i\.Z_.|
|000006a0| 65 57 00 69 58 00 64 7d | 00 65 57 00 69 59 00 83 |eW.iX.d}|.eW.iY..|
|000006b0| 02 00 5a 60 00 5b 57 00 | 64 7e 00 84 00 00 5a 61 |..Z`.[W.|d~....Za|
|000006c0| 00 64 7f 00 84 00 00 5a | 62 00 65 31 00 64 80 00 |.d.....Z|b.e1.d..|
|000006d0| 83 01 00 5a 63 00 65 31 | 00 64 81 00 83 01 00 5a |...Zc.e1|.d.....Z|
|000006e0| 64 00 65 31 00 64 82 00 | 83 01 00 5a 65 00 65 31 |d.e1.d..|...Ze.e1|
|000006f0| 00 64 42 00 83 01 00 5a | 66 00 65 31 00 64 3c 00 |.dB....Z|f.e1.d<.|
|00000700| 83 01 00 5a 67 00 65 31 | 00 64 1a 00 83 01 00 5a |...Zg.e1|.d.....Z|
|00000710| 68 00 65 63 00 65 64 00 | 66 02 00 5a 69 00 65 6a |h.ec.ed.|f..Zi.ej|
|00000720| 00 64 83 00 6a 02 00 6f | 30 00 01 64 1a 00 64 1b |.d..j..o|0..d..d.|
|00000730| 00 6b 6b 00 5a 6b 00 64 | 1a 00 64 1b 00 6b 25 00 |.kk.Zk.d|..d..k%.|
|00000740| 5a 25 00 65 6b 00 69 6c | 00 65 25 00 69 6d 00 65 |Z%.ek.il|.e%.im.e|
|00000750| 6a 00 19 83 01 00 01 6e | 01 00 01 64 1b 00 53 28 |j......n|...d..S(|
|00000760| 84 00 00 00 73 c9 09 00 | 00 0a 54 68 69 73 20 69 |....s...|..This i|
|00000770| 73 20 61 20 50 79 32 2e | 33 20 69 6d 70 6c 65 6d |s a Py2.|3 implem|
|00000780| 65 6e 74 61 74 69 6f 6e | 20 6f 66 20 64 65 63 69 |entation| of deci|
|00000790| 6d 61 6c 20 66 6c 6f 61 | 74 69 6e 67 20 70 6f 69 |mal floa|ting poi|
|000007a0| 6e 74 20 61 72 69 74 68 | 6d 65 74 69 63 20 62 61 |nt arith|metic ba|
|000007b0| 73 65 64 20 6f 6e 0a 74 | 68 65 20 47 65 6e 65 72 |sed on.t|he Gener|
|000007c0| 61 6c 20 44 65 63 69 6d | 61 6c 20 41 72 69 74 68 |al Decim|al Arith|
|000007d0| 6d 65 74 69 63 20 53 70 | 65 63 69 66 69 63 61 74 |metic Sp|ecificat|
|000007e0| 69 6f 6e 3a 0a 0a 20 20 | 20 20 77 77 77 32 2e 68 |ion:.. | www2.h|
|000007f0| 75 72 73 6c 65 79 2e 69 | 62 6d 2e 63 6f 6d 2f 64 |ursley.i|bm.com/d|
|00000800| 65 63 69 6d 61 6c 2f 64 | 65 63 61 72 69 74 68 2e |ecimal/d|ecarith.|
|00000810| 68 74 6d 6c 0a 0a 61 6e | 64 20 49 45 45 45 20 73 |html..an|d IEEE s|
|00000820| 74 61 6e 64 61 72 64 20 | 38 35 34 2d 31 39 38 37 |tandard |854-1987|
|00000830| 3a 0a 0a 20 20 20 20 77 | 77 77 2e 63 73 2e 62 65 |:.. w|ww.cs.be|
|00000840| 72 6b 65 6c 65 79 2e 65 | 64 75 2f 7e 65 6a 72 2f |rkeley.e|du/~ejr/|
|00000850| 70 72 6f 6a 65 63 74 73 | 2f 37 35 34 2f 70 72 69 |projects|/754/pri|
|00000860| 76 61 74 65 2f 64 72 61 | 66 74 73 2f 38 35 34 2d |vate/dra|fts/854-|
|00000870| 31 39 38 37 2f 64 69 72 | 2e 68 74 6d 6c 0a 0a 44 |1987/dir|.html..D|
|00000880| 65 63 69 6d 61 6c 20 66 | 6c 6f 61 74 69 6e 67 20 |ecimal f|loating |
|00000890| 70 6f 69 6e 74 20 68 61 | 73 20 66 69 6e 69 74 65 |point ha|s finite|
|000008a0| 20 70 72 65 63 69 73 69 | 6f 6e 20 77 69 74 68 20 | precisi|on with |
|000008b0| 61 72 62 69 74 72 61 72 | 69 6c 79 20 6c 61 72 67 |arbitrar|ily larg|
|000008c0| 65 20 62 6f 75 6e 64 73 | 2e 0a 0a 54 68 65 20 70 |e bounds|...The p|
|000008d0| 75 72 70 6f 73 65 20 6f | 66 20 74 68 69 73 20 6d |urpose o|f this m|
|000008e0| 6f 64 75 6c 65 20 69 73 | 20 74 6f 20 73 75 70 70 |odule is| to supp|
|000008f0| 6f 72 74 20 61 72 69 74 | 68 6d 65 74 69 63 20 75 |ort arit|hmetic u|
|00000900| 73 69 6e 67 20 66 61 6d | 69 6c 69 61 72 0a 22 73 |sing fam|iliar."s|
|00000910| 63 68 6f 6f 6c 68 6f 75 | 73 65 22 20 72 75 6c 65 |choolhou|se" rule|
|00000920| 73 20 61 6e 64 20 74 6f | 20 61 76 6f 69 64 20 73 |s and to| avoid s|
|00000930| 6f 6d 65 20 6f 66 20 74 | 68 65 20 74 72 69 63 6b |ome of t|he trick|
|00000940| 79 20 72 65 70 72 65 73 | 65 6e 74 61 74 69 6f 6e |y repres|entation|
|00000950| 0a 69 73 73 75 65 73 20 | 61 73 73 6f 63 69 61 74 |.issues |associat|
|00000960| 65 64 20 77 69 74 68 20 | 62 69 6e 61 72 79 20 66 |ed with |binary f|
|00000970| 6c 6f 61 74 69 6e 67 20 | 70 6f 69 6e 74 2e 20 20 |loating |point. |
|00000980| 54 68 65 20 70 61 63 6b | 61 67 65 20 69 73 20 65 |The pack|age is e|
|00000990| 73 70 65 63 69 61 6c 6c | 79 0a 75 73 65 66 75 6c |speciall|y.useful|
|000009a0| 20 66 6f 72 20 66 69 6e | 61 6e 63 69 61 6c 20 61 | for fin|ancial a|
|000009b0| 70 70 6c 69 63 61 74 69 | 6f 6e 73 20 6f 72 20 66 |pplicati|ons or f|
|000009c0| 6f 72 20 63 6f 6e 74 65 | 78 74 73 20 77 68 65 72 |or conte|xts wher|
|000009d0| 65 20 75 73 65 72 73 20 | 68 61 76 65 0a 65 78 70 |e users |have.exp|
|000009e0| 65 63 74 61 74 69 6f 6e | 73 20 74 68 61 74 20 61 |ectation|s that a|
|000009f0| 72 65 20 61 74 20 6f 64 | 64 73 20 77 69 74 68 20 |re at od|ds with |
|00000a00| 62 69 6e 61 72 79 20 66 | 6c 6f 61 74 69 6e 67 20 |binary f|loating |
|00000a10| 70 6f 69 6e 74 20 28 66 | 6f 72 20 69 6e 73 74 61 |point (f|or insta|
|00000a20| 6e 63 65 2c 0a 69 6e 20 | 62 69 6e 61 72 79 20 66 |nce,.in |binary f|
|00000a30| 6c 6f 61 74 69 6e 67 20 | 70 6f 69 6e 74 2c 20 31 |loating |point, 1|
|00000a40| 2e 30 30 20 25 20 30 2e | 31 20 67 69 76 65 73 20 |.00 % 0.|1 gives |
|00000a50| 30 2e 30 39 39 39 39 39 | 39 39 39 39 39 39 39 39 |0.099999|99999999|
|00000a60| 39 39 35 20 69 6e 73 74 | 65 61 64 0a 6f 66 20 74 |995 inst|ead.of t|
|00000a70| 68 65 20 65 78 70 65 63 | 74 65 64 20 44 65 63 69 |he expec|ted Deci|
|00000a80| 6d 61 6c 28 27 30 2e 30 | 30 27 29 20 72 65 74 75 |mal('0.0|0') retu|
|00000a90| 72 6e 65 64 20 62 79 20 | 64 65 63 69 6d 61 6c 20 |rned by |decimal |
|00000aa0| 66 6c 6f 61 74 69 6e 67 | 20 70 6f 69 6e 74 29 2e |floating| point).|
|00000ab0| 0a 0a 48 65 72 65 20 61 | 72 65 20 73 6f 6d 65 20 |..Here a|re some |
|00000ac0| 65 78 61 6d 70 6c 65 73 | 20 6f 66 20 75 73 69 6e |examples| of usin|
|00000ad0| 67 20 74 68 65 20 64 65 | 63 69 6d 61 6c 20 6d 6f |g the de|cimal mo|
|00000ae0| 64 75 6c 65 3a 0a 0a 3e | 3e 3e 20 66 72 6f 6d 20 |dule:..>|>> from |
|00000af0| 64 65 63 69 6d 61 6c 20 | 69 6d 70 6f 72 74 20 2a |decimal |import *|
|00000b00| 0a 3e 3e 3e 20 73 65 74 | 63 6f 6e 74 65 78 74 28 |.>>> set|context(|
|00000b10| 45 78 74 65 6e 64 65 64 | 43 6f 6e 74 65 78 74 29 |Extended|Context)|
|00000b20| 0a 3e 3e 3e 20 44 65 63 | 69 6d 61 6c 28 30 29 0a |.>>> Dec|imal(0).|
|00000b30| 44 65 63 69 6d 61 6c 28 | 27 30 27 29 0a 3e 3e 3e |Decimal(|'0').>>>|
|00000b40| 20 44 65 63 69 6d 61 6c | 28 27 31 27 29 0a 44 65 | Decimal|('1').De|
|00000b50| 63 69 6d 61 6c 28 27 31 | 27 29 0a 3e 3e 3e 20 44 |cimal('1|').>>> D|
|00000b60| 65 63 69 6d 61 6c 28 27 | 2d 2e 30 31 32 33 27 29 |ecimal('|-.0123')|
|00000b70| 0a 44 65 63 69 6d 61 6c | 28 27 2d 30 2e 30 31 32 |.Decimal|('-0.012|
|00000b80| 33 27 29 0a 3e 3e 3e 20 | 44 65 63 69 6d 61 6c 28 |3').>>> |Decimal(|
|00000b90| 31 32 33 34 35 36 29 0a | 44 65 63 69 6d 61 6c 28 |123456).|Decimal(|
|00000ba0| 27 31 32 33 34 35 36 27 | 29 0a 3e 3e 3e 20 44 65 |'123456'|).>>> De|
|00000bb0| 63 69 6d 61 6c 28 27 31 | 32 33 2e 34 35 65 31 32 |cimal('1|23.45e12|
|00000bc0| 33 34 35 36 37 38 39 30 | 31 32 33 34 35 36 37 38 |34567890|12345678|
|00000bd0| 39 30 27 29 0a 44 65 63 | 69 6d 61 6c 28 27 31 2e |90').Dec|imal('1.|
|00000be0| 32 33 34 35 45 2b 31 32 | 33 34 35 36 37 38 39 30 |2345E+12|34567890|
|00000bf0| 31 32 33 34 35 36 37 38 | 39 32 27 29 0a 3e 3e 3e |12345678|92').>>>|
|00000c00| 20 44 65 63 69 6d 61 6c | 28 27 31 2e 33 33 27 29 | Decimal|('1.33')|
|00000c10| 20 2b 20 44 65 63 69 6d | 61 6c 28 27 31 2e 32 37 | + Decim|al('1.27|
|00000c20| 27 29 0a 44 65 63 69 6d | 61 6c 28 27 32 2e 36 30 |').Decim|al('2.60|
|00000c30| 27 29 0a 3e 3e 3e 20 44 | 65 63 69 6d 61 6c 28 27 |').>>> D|ecimal('|
|00000c40| 31 32 2e 33 34 27 29 20 | 2b 20 44 65 63 69 6d 61 |12.34') |+ Decima|
|00000c50| 6c 28 27 33 2e 38 37 27 | 29 20 2d 20 44 65 63 69 |l('3.87'|) - Deci|
|00000c60| 6d 61 6c 28 27 31 38 2e | 34 31 27 29 0a 44 65 63 |mal('18.|41').Dec|
|00000c70| 69 6d 61 6c 28 27 2d 32 | 2e 32 30 27 29 0a 3e 3e |imal('-2|.20').>>|
|00000c80| 3e 20 64 69 67 20 3d 20 | 44 65 63 69 6d 61 6c 28 |> dig = |Decimal(|
|00000c90| 31 29 0a 3e 3e 3e 20 70 | 72 69 6e 74 20 64 69 67 |1).>>> p|rint dig|
|00000ca0| 20 2f 20 44 65 63 69 6d | 61 6c 28 33 29 0a 30 2e | / Decim|al(3).0.|
|00000cb0| 33 33 33 33 33 33 33 33 | 33 0a 3e 3e 3e 20 67 65 |33333333|3.>>> ge|
|00000cc0| 74 63 6f 6e 74 65 78 74 | 28 29 2e 70 72 65 63 20 |tcontext|().prec |
|00000cd0| 3d 20 31 38 0a 3e 3e 3e | 20 70 72 69 6e 74 20 64 |= 18.>>>| print d|
|00000ce0| 69 67 20 2f 20 44 65 63 | 69 6d 61 6c 28 33 29 0a |ig / Dec|imal(3).|
|00000cf0| 30 2e 33 33 33 33 33 33 | 33 33 33 33 33 33 33 33 |0.333333|33333333|
|00000d00| 33 33 33 33 0a 3e 3e 3e | 20 70 72 69 6e 74 20 64 |3333.>>>| print d|
|00000d10| 69 67 2e 73 71 72 74 28 | 29 0a 31 0a 3e 3e 3e 20 |ig.sqrt(|).1.>>> |
|00000d20| 70 72 69 6e 74 20 44 65 | 63 69 6d 61 6c 28 33 29 |print De|cimal(3)|
|00000d30| 2e 73 71 72 74 28 29 0a | 31 2e 37 33 32 30 35 30 |.sqrt().|1.732050|
|00000d40| 38 30 37 35 36 38 38 37 | 37 32 39 0a 3e 3e 3e 20 |80756887|729.>>> |
|00000d50| 70 72 69 6e 74 20 44 65 | 63 69 6d 61 6c 28 33 29 |print De|cimal(3)|
|00000d60| 20 2a 2a 20 31 32 33 0a | 34 2e 38 35 31 39 32 37 | ** 123.|4.851927|
|00000d70| 38 30 39 37 36 38 39 36 | 34 32 37 45 2b 35 38 0a |80976896|427E+58.|
|00000d80| 3e 3e 3e 20 69 6e 66 20 | 3d 20 44 65 63 69 6d 61 |>>> inf |= Decima|
|00000d90| 6c 28 31 29 20 2f 20 44 | 65 63 69 6d 61 6c 28 30 |l(1) / D|ecimal(0|
|00000da0| 29 0a 3e 3e 3e 20 70 72 | 69 6e 74 20 69 6e 66 0a |).>>> pr|int inf.|
|00000db0| 49 6e 66 69 6e 69 74 79 | 0a 3e 3e 3e 20 6e 65 67 |Infinity|.>>> neg|
|00000dc0| 69 6e 66 20 3d 20 44 65 | 63 69 6d 61 6c 28 2d 31 |inf = De|cimal(-1|
|00000dd0| 29 20 2f 20 44 65 63 69 | 6d 61 6c 28 30 29 0a 3e |) / Deci|mal(0).>|
|00000de0| 3e 3e 20 70 72 69 6e 74 | 20 6e 65 67 69 6e 66 0a |>> print| neginf.|
|00000df0| 2d 49 6e 66 69 6e 69 74 | 79 0a 3e 3e 3e 20 70 72 |-Infinit|y.>>> pr|
|00000e00| 69 6e 74 20 6e 65 67 69 | 6e 66 20 2b 20 69 6e 66 |int negi|nf + inf|
|00000e10| 0a 4e 61 4e 0a 3e 3e 3e | 20 70 72 69 6e 74 20 6e |.NaN.>>>| print n|
|00000e20| 65 67 69 6e 66 20 2a 20 | 69 6e 66 0a 2d 49 6e 66 |eginf * |inf.-Inf|
|00000e30| 69 6e 69 74 79 0a 3e 3e | 3e 20 70 72 69 6e 74 20 |inity.>>|> print |
|00000e40| 64 69 67 20 2f 20 30 0a | 49 6e 66 69 6e 69 74 79 |dig / 0.|Infinity|
|00000e50| 0a 3e 3e 3e 20 67 65 74 | 63 6f 6e 74 65 78 74 28 |.>>> get|context(|
|00000e60| 29 2e 74 72 61 70 73 5b | 44 69 76 69 73 69 6f 6e |).traps[|Division|
|00000e70| 42 79 5a 65 72 6f 5d 20 | 3d 20 31 0a 3e 3e 3e 20 |ByZero] |= 1.>>> |
|00000e80| 70 72 69 6e 74 20 64 69 | 67 20 2f 20 30 0a 54 72 |print di|g / 0.Tr|
|00000e90| 61 63 65 62 61 63 6b 20 | 28 6d 6f 73 74 20 72 65 |aceback |(most re|
|00000ea0| 63 65 6e 74 20 63 61 6c | 6c 20 6c 61 73 74 29 3a |cent cal|l last):|
|00000eb0| 0a 20 20 2e 2e 2e 0a 20 | 20 2e 2e 2e 0a 20 20 2e |. .... | .... .|
|00000ec0| 2e 2e 0a 44 69 76 69 73 | 69 6f 6e 42 79 5a 65 72 |...Divis|ionByZer|
|00000ed0| 6f 3a 20 78 20 2f 20 30 | 0a 3e 3e 3e 20 63 20 3d |o: x / 0|.>>> c =|
|00000ee0| 20 43 6f 6e 74 65 78 74 | 28 29 0a 3e 3e 3e 20 63 | Context|().>>> c|
|00000ef0| 2e 74 72 61 70 73 5b 49 | 6e 76 61 6c 69 64 4f 70 |.traps[I|nvalidOp|
|00000f00| 65 72 61 74 69 6f 6e 5d | 20 3d 20 30 0a 3e 3e 3e |eration]| = 0.>>>|
|00000f10| 20 70 72 69 6e 74 20 63 | 2e 66 6c 61 67 73 5b 49 | print c|.flags[I|
|00000f20| 6e 76 61 6c 69 64 4f 70 | 65 72 61 74 69 6f 6e 5d |nvalidOp|eration]|
|00000f30| 0a 30 0a 3e 3e 3e 20 63 | 2e 64 69 76 69 64 65 28 |.0.>>> c|.divide(|
|00000f40| 44 65 63 69 6d 61 6c 28 | 30 29 2c 20 44 65 63 69 |Decimal(|0), Deci|
|00000f50| 6d 61 6c 28 30 29 29 0a | 44 65 63 69 6d 61 6c 28 |mal(0)).|Decimal(|
|00000f60| 27 4e 61 4e 27 29 0a 3e | 3e 3e 20 63 2e 74 72 61 |'NaN').>|>> c.tra|
|00000f70| 70 73 5b 49 6e 76 61 6c | 69 64 4f 70 65 72 61 74 |ps[Inval|idOperat|
|00000f80| 69 6f 6e 5d 20 3d 20 31 | 0a 3e 3e 3e 20 70 72 69 |ion] = 1|.>>> pri|
|00000f90| 6e 74 20 63 2e 66 6c 61 | 67 73 5b 49 6e 76 61 6c |nt c.fla|gs[Inval|
|00000fa0| 69 64 4f 70 65 72 61 74 | 69 6f 6e 5d 0a 31 0a 3e |idOperat|ion].1.>|
|00000fb0| 3e 3e 20 63 2e 66 6c 61 | 67 73 5b 49 6e 76 61 6c |>> c.fla|gs[Inval|
|00000fc0| 69 64 4f 70 65 72 61 74 | 69 6f 6e 5d 20 3d 20 30 |idOperat|ion] = 0|
|00000fd0| 0a 3e 3e 3e 20 70 72 69 | 6e 74 20 63 2e 66 6c 61 |.>>> pri|nt c.fla|
|00000fe0| 67 73 5b 49 6e 76 61 6c | 69 64 4f 70 65 72 61 74 |gs[Inval|idOperat|
|00000ff0| 69 6f 6e 5d 0a 30 0a 3e | 3e 3e 20 70 72 69 6e 74 |ion].0.>|>> print|
|00001000| 20 63 2e 64 69 76 69 64 | 65 28 44 65 63 69 6d 61 | c.divid|e(Decima|
|00001010| 6c 28 30 29 2c 20 44 65 | 63 69 6d 61 6c 28 30 29 |l(0), De|cimal(0)|
|00001020| 29 0a 54 72 61 63 65 62 | 61 63 6b 20 28 6d 6f 73 |).Traceb|ack (mos|
|00001030| 74 20 72 65 63 65 6e 74 | 20 63 61 6c 6c 20 6c 61 |t recent| call la|
|00001040| 73 74 29 3a 0a 20 20 2e | 2e 2e 0a 20 20 2e 2e 2e |st):. .|... ...|
|00001050| 0a 20 20 2e 2e 2e 0a 49 | 6e 76 61 6c 69 64 4f 70 |. ....I|nvalidOp|
|00001060| 65 72 61 74 69 6f 6e 3a | 20 30 20 2f 20 30 0a 3e |eration:| 0 / 0.>|
|00001070| 3e 3e 20 70 72 69 6e 74 | 20 63 2e 66 6c 61 67 73 |>> print| c.flags|
|00001080| 5b 49 6e 76 61 6c 69 64 | 4f 70 65 72 61 74 69 6f |[Invalid|Operatio|
|00001090| 6e 5d 0a 31 0a 3e 3e 3e | 20 63 2e 66 6c 61 67 73 |n].1.>>>| c.flags|
|000010a0| 5b 49 6e 76 61 6c 69 64 | 4f 70 65 72 61 74 69 6f |[Invalid|Operatio|
|000010b0| 6e 5d 20 3d 20 30 0a 3e | 3e 3e 20 63 2e 74 72 61 |n] = 0.>|>> c.tra|
|000010c0| 70 73 5b 49 6e 76 61 6c | 69 64 4f 70 65 72 61 74 |ps[Inval|idOperat|
|000010d0| 69 6f 6e 5d 20 3d 20 30 | 0a 3e 3e 3e 20 70 72 69 |ion] = 0|.>>> pri|
|000010e0| 6e 74 20 63 2e 64 69 76 | 69 64 65 28 44 65 63 69 |nt c.div|ide(Deci|
|000010f0| 6d 61 6c 28 30 29 2c 20 | 44 65 63 69 6d 61 6c 28 |mal(0), |Decimal(|
|00001100| 30 29 29 0a 4e 61 4e 0a | 3e 3e 3e 20 70 72 69 6e |0)).NaN.|>>> prin|
|00001110| 74 20 63 2e 66 6c 61 67 | 73 5b 49 6e 76 61 6c 69 |t c.flag|s[Invali|
|00001120| 64 4f 70 65 72 61 74 69 | 6f 6e 5d 0a 31 0a 3e 3e |dOperati|on].1.>>|
|00001130| 3e 0a 74 07 00 00 00 44 | 65 63 69 6d 61 6c 74 07 |>.t....D|ecimalt.|
|00001140| 00 00 00 43 6f 6e 74 65 | 78 74 74 0e 00 00 00 44 |...Conte|xtt....D|
|00001150| 65 66 61 75 6c 74 43 6f | 6e 74 65 78 74 74 0c 00 |efaultCo|ntextt..|
|00001160| 00 00 42 61 73 69 63 43 | 6f 6e 74 65 78 74 74 0f |..BasicC|ontextt.|
|00001170| 00 00 00 45 78 74 65 6e | 64 65 64 43 6f 6e 74 65 |...Exten|dedConte|
|00001180| 78 74 74 10 00 00 00 44 | 65 63 69 6d 61 6c 45 78 |xtt....D|ecimalEx|
|00001190| 63 65 70 74 69 6f 6e 74 | 07 00 00 00 43 6c 61 6d |ceptiont|....Clam|
|000011a0| 70 65 64 74 10 00 00 00 | 49 6e 76 61 6c 69 64 4f |pedt....|InvalidO|
|000011b0| 70 65 72 61 74 69 6f 6e | 74 0e 00 00 00 44 69 76 |peration|t....Div|
|000011c0| 69 73 69 6f 6e 42 79 5a | 65 72 6f 74 07 00 00 00 |isionByZ|erot....|
|000011d0| 49 6e 65 78 61 63 74 74 | 07 00 00 00 52 6f 75 6e |Inexactt|....Roun|
|000011e0| 64 65 64 74 09 00 00 00 | 53 75 62 6e 6f 72 6d 61 |dedt....|Subnorma|
|000011f0| 6c 74 08 00 00 00 4f 76 | 65 72 66 6c 6f 77 74 09 |lt....Ov|erflowt.|
|00001200| 00 00 00 55 6e 64 65 72 | 66 6c 6f 77 74 0a 00 00 |...Under|flowt...|
|00001210| 00 52 4f 55 4e 44 5f 44 | 4f 57 4e 74 0d 00 00 00 |.ROUND_D|OWNt....|
|00001220| 52 4f 55 4e 44 5f 48 41 | 4c 46 5f 55 50 74 0f 00 |ROUND_HA|LF_UPt..|
|00001230| 00 00 52 4f 55 4e 44 5f | 48 41 4c 46 5f 45 56 45 |..ROUND_|HALF_EVE|
|00001240| 4e 74 0d 00 00 00 52 4f | 55 4e 44 5f 43 45 49 4c |Nt....RO|UND_CEIL|
|00001250| 49 4e 47 74 0b 00 00 00 | 52 4f 55 4e 44 5f 46 4c |INGt....|ROUND_FL|
|00001260| 4f 4f 52 74 08 00 00 00 | 52 4f 55 4e 44 5f 55 50 |OORt....|ROUND_UP|
|00001270| 74 0f 00 00 00 52 4f 55 | 4e 44 5f 48 41 4c 46 5f |t....ROU|ND_HALF_|
|00001280| 44 4f 57 4e 74 0a 00 00 | 00 52 4f 55 4e 44 5f 30 |DOWNt...|.ROUND_0|
|00001290| 35 55 50 74 0a 00 00 00 | 73 65 74 63 6f 6e 74 65 |5UPt....|setconte|
|000012a0| 78 74 74 0a 00 00 00 67 | 65 74 63 6f 6e 74 65 78 |xtt....g|etcontex|
|000012b0| 74 74 0c 00 00 00 6c 6f | 63 61 6c 63 6f 6e 74 65 |tt....lo|calconte|
|000012c0| 78 74 69 ff ff ff ff 4e | 28 01 00 00 00 74 0a 00 |xti....N|(....t..|
|000012d0| 00 00 6e 61 6d 65 64 74 | 75 70 6c 65 74 0c 00 00 |..namedt|uplet...|
|000012e0| 00 44 65 63 69 6d 61 6c | 54 75 70 6c 65 73 14 00 |.Decimal|Tuples..|
|000012f0| 00 00 73 69 67 6e 20 64 | 69 67 69 74 73 20 65 78 |..sign d|igits ex|
|00001300| 70 6f 6e 65 6e 74 63 00 | 00 00 00 01 00 00 00 01 |ponentc.|........|
|00001310| 00 00 00 47 00 00 00 73 | 04 00 00 00 7c 00 00 53 |...G...s|....|..S|
|00001320| 28 00 00 00 00 28 00 00 | 00 00 28 01 00 00 00 74 |(....(..|..(....t|
|00001330| 04 00 00 00 61 72 67 73 | 28 00 00 00 00 28 00 00 |....args|(....(..|
|00001340| 00 00 73 1d 00 00 00 2f | 75 73 72 2f 6c 69 62 2f |..s..../|usr/lib/|
|00001350| 70 79 74 68 6f 6e 32 2e | 36 2f 64 65 63 69 6d 61 |python2.|6/decima|
|00001360| 6c 2e 70 79 74 08 00 00 | 00 3c 6c 61 6d 62 64 61 |l.pyt...|.<lambda|
|00001370| 3e 90 00 00 00 73 00 00 | 00 00 63 00 00 00 00 00 |>....s..|..c.....|
|00001380| 00 00 00 01 00 00 00 42 | 00 00 00 73 17 00 00 00 |.......B|...s....|
|00001390| 65 00 00 5a 01 00 64 00 | 00 5a 02 00 64 01 00 84 |e..Z..d.|.Z..d...|
|000013a0| 00 00 5a 03 00 52 53 28 | 02 00 00 00 73 2d 03 00 |..Z..RS(|....s-..|
|000013b0| 00 42 61 73 65 20 65 78 | 63 65 70 74 69 6f 6e 20 |.Base ex|ception |
|000013c0| 63 6c 61 73 73 2e 0a 0a | 20 20 20 20 55 73 65 64 |class...| Used|
|000013d0| 20 65 78 63 65 70 74 69 | 6f 6e 73 20 64 65 72 69 | excepti|ons deri|
|000013e0| 76 65 20 66 72 6f 6d 20 | 74 68 69 73 2e 0a 20 20 |ve from |this.. |
|000013f0| 20 20 49 66 20 61 6e 20 | 65 78 63 65 70 74 69 6f | If an |exceptio|
|00001400| 6e 20 64 65 72 69 76 65 | 73 20 66 72 6f 6d 20 61 |n derive|s from a|
|00001410| 6e 6f 74 68 65 72 20 65 | 78 63 65 70 74 69 6f 6e |nother e|xception|
|00001420| 20 62 65 73 69 64 65 73 | 20 74 68 69 73 20 28 73 | besides| this (s|
|00001430| 75 63 68 20 61 73 0a 20 | 20 20 20 55 6e 64 65 72 |uch as. | Under|
|00001440| 66 6c 6f 77 20 28 49 6e | 65 78 61 63 74 2c 20 52 |flow (In|exact, R|
|00001450| 6f 75 6e 64 65 64 2c 20 | 53 75 62 6e 6f 72 6d 61 |ounded, |Subnorma|
|00001460| 6c 29 20 74 68 61 74 20 | 69 6e 64 69 63 61 74 65 |l) that |indicate|
|00001470| 73 20 74 68 61 74 20 69 | 74 20 69 73 20 6f 6e 6c |s that i|t is onl|
|00001480| 79 0a 20 20 20 20 63 61 | 6c 6c 65 64 20 69 66 20 |y. ca|lled if |
|00001490| 74 68 65 20 6f 74 68 65 | 72 73 20 61 72 65 20 70 |the othe|rs are p|
|000014a0| 72 65 73 65 6e 74 2e 20 | 20 54 68 69 73 20 69 73 |resent. | This is|
|000014b0| 6e 27 74 20 61 63 74 75 | 61 6c 6c 79 20 75 73 65 |n't actu|ally use|
|000014c0| 64 20 66 6f 72 0a 20 20 | 20 20 61 6e 79 74 68 69 |d for. | anythi|
|000014d0| 6e 67 2c 20 74 68 6f 75 | 67 68 2e 0a 0a 20 20 20 |ng, thou|gh... |
|000014e0| 20 68 61 6e 64 6c 65 20 | 20 2d 2d 20 43 61 6c 6c | handle | -- Call|
|000014f0| 65 64 20 77 68 65 6e 20 | 63 6f 6e 74 65 78 74 2e |ed when |context.|
|00001500| 5f 72 61 69 73 65 5f 65 | 72 72 6f 72 20 69 73 20 |_raise_e|rror is |
|00001510| 63 61 6c 6c 65 64 20 61 | 6e 64 20 74 68 65 0a 20 |called a|nd the. |
|00001520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 74 72 | | tr|
|00001530| 61 70 5f 65 6e 61 62 6c | 65 72 20 69 73 20 73 65 |ap_enabl|er is se|
|00001540| 74 2e 20 20 46 69 72 73 | 74 20 61 72 67 75 6d 65 |t. Firs|t argume|
|00001550| 6e 74 20 69 73 20 73 65 | 6c 66 2c 20 73 65 63 6f |nt is se|lf, seco|
|00001560| 6e 64 20 69 73 20 74 68 | 65 0a 20 20 20 20 20 20 |nd is th|e. |
|00001570| 20 20 20 20 20 20 20 20 | 20 63 6f 6e 74 65 78 74 | | context|
|00001580| 2e 20 20 4d 6f 72 65 20 | 61 72 67 75 6d 65 6e 74 |. More |argument|
|00001590| 73 20 63 61 6e 20 62 65 | 20 67 69 76 65 6e 2c 20 |s can be| given, |
|000015a0| 74 68 6f 73 65 20 62 65 | 69 6e 67 20 61 66 74 65 |those be|ing afte|
|000015b0| 72 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r. | |
|000015c0| 20 74 68 65 20 65 78 70 | 6c 61 6e 61 74 69 6f 6e | the exp|lanation|
|000015d0| 20 69 6e 20 5f 72 61 69 | 73 65 5f 65 72 72 6f 72 | in _rai|se_error|
|000015e0| 20 28 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 0a 20 | (For ex|ample,. |
|000015f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 6f | | co|
|00001600| 6e 74 65 78 74 2e 5f 72 | 61 69 73 65 5f 65 72 72 |ntext._r|aise_err|
|00001610| 6f 72 28 4e 65 77 45 72 | 72 6f 72 2c 20 27 28 2d |or(NewEr|ror, '(-|
|00001620| 78 29 21 27 2c 20 73 65 | 6c 66 2e 5f 73 69 67 6e |x)!', se|lf._sign|
|00001630| 29 20 77 6f 75 6c 64 0a | 20 20 20 20 20 20 20 20 |) would.| |
|00001640| 20 20 20 20 20 20 20 63 | 61 6c 6c 20 4e 65 77 45 | c|all NewE|
|00001650| 72 72 6f 72 28 29 2e 68 | 61 6e 64 6c 65 28 63 6f |rror().h|andle(co|
|00001660| 6e 74 65 78 74 2c 20 73 | 65 6c 66 2e 5f 73 69 67 |ntext, s|elf._sig|
|00001670| 6e 29 2e 29 0a 0a 20 20 | 20 20 54 6f 20 64 65 66 |n).).. | To def|
|00001680| 69 6e 65 20 61 20 6e 65 | 77 20 65 78 63 65 70 74 |ine a ne|w except|
|00001690| 69 6f 6e 2c 20 69 74 20 | 73 68 6f 75 6c 64 20 62 |ion, it |should b|
|000016a0| 65 20 73 75 66 66 69 63 | 69 65 6e 74 20 74 6f 20 |e suffic|ient to |
|000016b0| 68 61 76 65 20 69 74 20 | 64 65 72 69 76 65 0a 20 |have it |derive. |
|000016c0| 20 20 20 66 72 6f 6d 20 | 44 65 63 69 6d 61 6c 45 | from |DecimalE|
|000016d0| 78 63 65 70 74 69 6f 6e | 2e 0a 20 20 20 20 63 02 |xception|.. c.|
|000016e0| 00 00 00 03 00 00 00 01 | 00 00 00 47 00 00 00 73 |........|...G...s|
|000016f0| 04 00 00 00 64 00 00 53 | 28 01 00 00 00 4e 28 00 |....d..S|(....N(.|
|00001700| 00 00 00 28 03 00 00 00 | 74 04 00 00 00 73 65 6c |...(....|t....sel|
|00001710| 66 74 07 00 00 00 63 6f | 6e 74 65 78 74 52 1b 00 |ft....co|ntextR..|
|00001720| 00 00 28 00 00 00 00 28 | 00 00 00 00 73 1d 00 00 |..(....(|....s...|
|00001730| 00 2f 75 73 72 2f 6c 69 | 62 2f 70 79 74 68 6f 6e |./usr/li|b/python|
|00001740| 32 2e 36 2f 64 65 63 69 | 6d 61 6c 2e 70 79 74 06 |2.6/deci|mal.pyt.|
|00001750| 00 00 00 68 61 6e 64 6c | 65 b1 00 00 00 73 02 00 |...handl|e....s..|
|00001760| 00 00 00 01 28 04 00 00 | 00 74 08 00 00 00 5f 5f |....(...|.t....__|
|00001770| 6e 61 6d 65 5f 5f 74 0a | 00 00 00 5f 5f 6d 6f 64 |name__t.|...__mod|
|00001780| 75 6c 65 5f 5f 74 07 00 | 00 00 5f 5f 64 6f 63 5f |ule__t..|..__doc_|
|00001790| 5f 52 1f 00 00 00 28 00 | 00 00 00 28 00 00 00 00 |_R....(.|...(....|
|000017a0| 28 00 00 00 00 73 1d 00 | 00 00 2f 75 73 72 2f 6c |(....s..|../usr/l|
|000017b0| 69 62 2f 70 79 74 68 6f | 6e 32 2e 36 2f 64 65 63 |ib/pytho|n2.6/dec|
|000017c0| 69 6d 61 6c 2e 70 79 52 | 05 00 00 00 9e 00 00 00 |imal.pyR|........|
|000017d0| 73 04 00 00 00 06 12 06 | 01 63 00 00 00 00 00 00 |s.......|.c......|
|000017e0| 00 00 01 00 00 00 42 00 | 00 00 73 0e 00 00 00 65 |......B.|..s....e|
|000017f0| 00 00 5a 01 00 64 00 00 | 5a 02 00 52 53 28 01 00 |..Z..d..|Z..RS(..|
|00001800| 00 00 73 29 02 00 00 45 | 78 70 6f 6e 65 6e 74 20 |..s)...E|xponent |
|00001810| 6f 66 20 61 20 30 20 63 | 68 61 6e 67 65 64 20 74 |of a 0 c|hanged t|
|00001820| 6f 20 66 69 74 20 62 6f | 75 6e 64 73 2e 0a 0a 20 |o fit bo|unds... |
|00001830| 20 20 20 54 68 69 73 20 | 6f 63 63 75 72 73 20 61 | This |occurs a|
|00001840| 6e 64 20 73 69 67 6e 61 | 6c 73 20 63 6c 61 6d 70 |nd signa|ls clamp|
|00001850| 65 64 20 69 66 20 74 68 | 65 20 65 78 70 6f 6e 65 |ed if th|e expone|
|00001860| 6e 74 20 6f 66 20 61 20 | 72 65 73 75 6c 74 20 68 |nt of a |result h|
|00001870| 61 73 20 62 65 65 6e 0a | 20 20 20 20 61 6c 74 65 |as been.| alte|
|00001880| 72 65 64 20 69 6e 20 6f | 72 64 65 72 20 74 6f 20 |red in o|rder to |
|00001890| 66 69 74 20 74 68 65 20 | 63 6f 6e 73 74 72 61 69 |fit the |constrai|
|000018a0| 6e 74 73 20 6f 66 20 61 | 20 73 70 65 63 69 66 69 |nts of a| specifi|
|000018b0| 63 20 63 6f 6e 63 72 65 | 74 65 0a 20 20 20 20 72 |c concre|te. r|
|000018c0| 65 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 2e 20 20 |epresent|ation. |
|000018d0| 54 68 69 73 20 6d 61 79 | 20 6f 63 63 75 72 20 77 |This may| occur w|
|000018e0| 68 65 6e 20 74 68 65 20 | 65 78 70 6f 6e 65 6e 74 |hen the |exponent|
|000018f0| 20 6f 66 20 61 20 7a 65 | 72 6f 20 72 65 73 75 6c | of a ze|ro resul|
|00001900| 74 20 77 6f 75 6c 64 0a | 20 20 20 20 62 65 20 6f |t would.| be o|
|00001910| 75 74 73 69 64 65 20 74 | 68 65 20 62 6f 75 6e 64 |utside t|he bound|
|00001920| 73 20 6f 66 20 61 20 72 | 65 70 72 65 73 65 6e 74 |s of a r|epresent|
|00001930| 61 74 69 6f 6e 2c 20 6f | 72 20 77 68 65 6e 20 61 |ation, o|r when a|
|00001940| 20 6c 61 72 67 65 20 6e | 6f 72 6d 61 6c 0a 20 20 | large n|ormal. |
|00001950| 20 20 6e 75 6d 62 65 72 | 20 77 6f 75 6c 64 20 68 | number| would h|
|00001960| 61 76 65 20 61 6e 20 65 | 6e 63 6f 64 65 64 20 65 |ave an e|ncoded e|
|00001970| 78 70 6f 6e 65 6e 74 20 | 74 68 61 74 20 63 61 6e |xponent |that can|
|00001980| 6e 6f 74 20 62 65 20 72 | 65 70 72 65 73 65 6e 74 |not be r|epresent|
|00001990| 65 64 2e 20 20 49 6e 0a | 20 20 20 20 74 68 69 73 |ed. In.| this|
|000019a0| 20 6c 61 74 74 65 72 20 | 63 61 73 65 2c 20 74 68 | latter |case, th|
|000019b0| 65 20 65 78 70 6f 6e 65 | 6e 74 20 69 73 20 72 65 |e expone|nt is re|
|000019c0| 64 75 63 65 64 20 74 6f | 20 66 69 74 20 61 6e 64 |duced to| fit and|
|000019d0| 20 74 68 65 20 63 6f 72 | 72 65 73 70 6f 6e 64 69 | the cor|respondi|
|000019e0| 6e 67 0a 20 20 20 20 6e | 75 6d 62 65 72 20 6f 66 |ng. n|umber of|
|000019f0| 20 7a 65 72 6f 20 64 69 | 67 69 74 73 20 61 72 65 | zero di|gits are|
|00001a00| 20 61 70 70 65 6e 64 65 | 64 20 74 6f 20 74 68 65 | appende|d to the|
|00001a10| 20 63 6f 65 66 66 69 63 | 69 65 6e 74 20 28 22 66 | coeffic|ient ("f|
|00001a20| 6f 6c 64 2d 64 6f 77 6e | 22 29 2e 0a 20 20 20 20 |old-down|").. |
|00001a30| 28 03 00 00 00 52 20 00 | 00 00 52 21 00 00 00 52 |(....R .|..R!...R|
|00001a40| 22 00 00 00 28 00 00 00 | 00 28 00 00 00 00 28 00 |"...(...|.(....(.|
|00001a50| 00 00 00 73 1d 00 00 00 | 2f 75 73 72 2f 6c 69 62 |...s....|/usr/lib|
|00001a60| 2f 70 79 74 68 6f 6e 32 | 2e 36 2f 64 65 63 69 6d |/python2|.6/decim|
|00001a70| 61 6c 2e 70 79 52 06 00 | 00 00 b5 00 00 00 73 02 |al.pyR..|......s.|
|00001a80| 00 00 00 06 0a 63 00 00 | 00 00 00 00 00 00 01 00 |.....c..|........|
|00001a90| 00 00 42 00 00 00 73 17 | 00 00 00 65 00 00 5a 01 |..B...s.|...e..Z.|
|00001aa0| 00 64 00 00 5a 02 00 64 | 01 00 84 00 00 5a 03 00 |.d..Z..d|.....Z..|
|00001ab0| 52 53 28 02 00 00 00 73 | 30 02 00 00 41 6e 20 69 |RS(....s|0...An i|
|00001ac0| 6e 76 61 6c 69 64 20 6f | 70 65 72 61 74 69 6f 6e |nvalid o|peration|
|00001ad0| 20 77 61 73 20 70 65 72 | 66 6f 72 6d 65 64 2e 0a | was per|formed..|
|00001ae0| 0a 20 20 20 20 56 61 72 | 69 6f 75 73 20 62 61 64 |. Var|ious bad|
|00001af0| 20 74 68 69 6e 67 73 20 | 63 61 75 73 65 20 74 68 | things |cause th|
|00001b00| 69 73 3a 0a 0a 20 20 20 | 20 53 6f 6d 65 74 68 69 |is:.. | Somethi|
|00001b10| 6e 67 20 63 72 65 61 74 | 65 73 20 61 20 73 69 67 |ng creat|es a sig|
|00001b20| 6e 61 6c 69 6e 67 20 4e | 61 4e 0a 20 20 20 20 2d |naling N|aN. -|
|00001b30| 49 4e 46 20 2b 20 49 4e | 46 0a 20 20 20 20 30 20 |INF + IN|F. 0 |
|00001b40| 2a 20 28 2b 2d 29 49 4e | 46 0a 20 20 20 20 28 2b |* (+-)IN|F. (+|
|00001b50| 2d 29 49 4e 46 20 2f 20 | 28 2b 2d 29 49 4e 46 0a |-)INF / |(+-)INF.|
|00001b60| 20 20 20 20 78 20 25 20 | 30 0a 20 20 20 20 28 2b | x % |0. (+|
|00001b70| 2d 29 49 4e 46 20 25 20 | 78 0a 20 20 20 20 78 2e |-)INF % |x. x.|
|00001b80| 5f 72 65 73 63 61 6c 65 | 28 20 6e 6f 6e 2d 69 6e |_rescale|( non-in|
|00001b90| 74 65 67 65 72 20 29 0a | 20 20 20 20 73 71 72 74 |teger ).| sqrt|
|00001ba0| 28 2d 78 29 20 2c 20 78 | 20 3e 20 30 0a 20 20 20 |(-x) , x| > 0. |
|00001bb0| 20 30 20 2a 2a 20 30 0a | 20 20 20 20 78 20 2a 2a | 0 ** 0.| x **|
|00001bc0| 20 28 6e 6f 6e 2d 69 6e | 74 65 67 65 72 29 0a 20 | (non-in|teger). |
|00001bd0| 20 20 20 78 20 2a 2a 20 | 28 2b 2d 29 49 4e 46 0a | x ** |(+-)INF.|
|00001be0| 20 20 20 20 41 6e 20 6f | 70 65 72 61 6e 64 20 69 | An o|perand i|
|00001bf0| 73 20 69 6e 76 61 6c 69 | 64 0a 0a 20 20 20 20 54 |s invali|d.. T|
|00001c00| 68 65 20 72 65 73 75 6c | 74 20 6f 66 20 74 68 65 |he resul|t of the|
|00001c10| 20 6f 70 65 72 61 74 69 | 6f 6e 20 61 66 74 65 72 | operati|on after|
|00001c20| 20 74 68 65 73 65 20 69 | 73 20 61 20 71 75 69 65 | these i|s a quie|
|00001c30| 74 20 70 6f 73 69 74 69 | 76 65 20 4e 61 4e 2c 0a |t positi|ve NaN,.|
|00001c40| 20 20 20 20 65 78 63 65 | 70 74 20 77 68 65 6e 20 | exce|pt when |
|00001c50| 74 68 65 20 63 61 75 73 | 65 20 69 73 20 61 20 73 |the caus|e is a s|
|00001c60| 69 67 6e 61 6c 69 6e 67 | 20 4e 61 4e 2c 20 69 6e |ignaling| NaN, in|
|00001c70| 20 77 68 69 63 68 20 63 | 61 73 65 20 74 68 65 20 | which c|ase the |
|00001c80| 72 65 73 75 6c 74 20 69 | 73 0a 20 20 20 20 61 6c |result i|s. al|
|00001c90| 73 6f 20 61 20 71 75 69 | 65 74 20 4e 61 4e 2c 20 |so a qui|et NaN, |
|00001ca0| 62 75 74 20 77 69 74 68 | 20 74 68 65 20 6f 72 69 |but with| the ori|
|00001cb0| 67 69 6e 61 6c 20 73 69 | 67 6e 2c 20 61 6e 64 20 |ginal si|gn, and |
|00001cc0| 61 6e 20 6f 70 74 69 6f | 6e 61 6c 0a 20 20 20 20 |an optio|nal. |
|00001cd0| 64 69 61 67 6e 6f 73 74 | 69 63 20 69 6e 66 6f 72 |diagnost|ic infor|
|00001ce0| 6d 61 74 69 6f 6e 2e 0a | 20 20 20 20 63 02 00 00 |mation..| c...|
|00001cf0| 00 04 00 00 00 05 00 00 | 00 47 00 00 00 73 3c 00 |........|.G...s<.|
|00001d00| 00 00 7c 02 00 6f 31 00 | 01 74 00 00 7c 02 00 64 |..|..o1.|.t..|..d|
|00001d10| 01 00 19 69 01 00 7c 02 | 00 64 01 00 19 69 02 00 |...i..|.|.d...i..|
|00001d20| 64 02 00 74 03 00 83 04 | 00 7d 03 00 7c 03 00 69 |d..t....|.}..|..i|
|00001d30| 04 00 7c 01 00 83 01 00 | 53 01 74 05 00 53 28 03 |..|.....|S.t..S(.|
|00001d40| 00 00 00 4e 69 00 00 00 | 00 74 01 00 00 00 6e 28 |...Ni...|.t....n(|
|00001d50| 06 00 00 00 74 10 00 00 | 00 5f 64 65 63 5f 66 72 |....t...|._dec_fr|
|00001d60| 6f 6d 5f 74 72 69 70 6c | 65 74 05 00 00 00 5f 73 |om_tripl|et...._s|
|00001d70| 69 67 6e 74 04 00 00 00 | 5f 69 6e 74 74 04 00 00 |ignt....|_intt...|
|00001d80| 00 54 72 75 65 74 08 00 | 00 00 5f 66 69 78 5f 6e |.Truet..|.._fix_n|
|00001d90| 61 6e 74 04 00 00 00 5f | 4e 61 4e 28 04 00 00 00 |ant...._|NaN(....|
|00001da0| 52 1d 00 00 00 52 1e 00 | 00 00 52 1b 00 00 00 74 |R....R..|..R....t|
|00001db0| 03 00 00 00 61 6e 73 28 | 00 00 00 00 28 00 00 00 |....ans(|....(...|
|00001dc0| 00 73 1d 00 00 00 2f 75 | 73 72 2f 6c 69 62 2f 70 |.s..../u|sr/lib/p|
|00001dd0| 79 74 68 6f 6e 32 2e 36 | 2f 64 65 63 69 6d 61 6c |ython2.6|/decimal|
|00001de0| 2e 70 79 52 1f 00 00 00 | d8 00 00 00 73 08 00 00 |.pyR....|....s...|
|00001df0| 00 00 01 07 01 23 01 0e | 01 28 04 00 00 00 52 20 |.....#..|.(....R |
|00001e00| 00 00 00 52 21 00 00 00 | 52 22 00 00 00 52 1f 00 |...R!...|R"...R..|
|00001e10| 00 00 28 00 00 00 00 28 | 00 00 00 00 28 00 00 00 |..(....(|....(...|
|00001e20| 00 73 1d 00 00 00 2f 75 | 73 72 2f 6c 69 62 2f 70 |.s..../u|sr/lib/p|
|00001e30| 79 74 68 6f 6e 32 2e 36 | 2f 64 65 63 69 6d 61 6c |ython2.6|/decimal|
|00001e40| 2e 70 79 52 07 00 00 00 | c1 00 00 00 73 04 00 00 |.pyR....|....s...|
|00001e50| 00 06 16 06 01 74 10 00 | 00 00 43 6f 6e 76 65 72 |.....t..|..Conver|
|00001e60| 73 69 6f 6e 53 79 6e 74 | 61 78 63 00 00 00 00 00 |sionSynt|axc.....|
|00001e70| 00 00 00 01 00 00 00 42 | 00 00 00 73 17 00 00 00 |.......B|...s....|
|00001e80| 65 00 00 5a 01 00 64 00 | 00 5a 02 00 64 01 00 84 |e..Z..d.|.Z..d...|
|00001e90| 00 00 5a 03 00 52 53 28 | 02 00 00 00 73 dd 00 00 |..Z..RS(|....s...|
|00001ea0| 00 54 72 79 69 6e 67 20 | 74 6f 20 63 6f 6e 76 65 |.Trying |to conve|
|00001eb0| 72 74 20 62 61 64 6c 79 | 20 66 6f 72 6d 65 64 20 |rt badly| formed |
|00001ec0| 73 74 72 69 6e 67 2e 0a | 0a 20 20 20 20 54 68 69 |string..|. Thi|
|00001ed0| 73 20 6f 63 63 75 72 73 | 20 61 6e 64 20 73 69 67 |s occurs| and sig|
|00001ee0| 6e 61 6c 73 20 69 6e 76 | 61 6c 69 64 2d 6f 70 65 |nals inv|alid-ope|
|00001ef0| 72 61 74 69 6f 6e 20 69 | 66 20 61 6e 20 73 74 72 |ration i|f an str|
|00001f00| 69 6e 67 20 69 73 20 62 | 65 69 6e 67 0a 20 20 20 |ing is b|eing. |
|00001f10| 20 63 6f 6e 76 65 72 74 | 65 64 20 74 6f 20 61 20 | convert|ed to a |
|00001f20| 6e 75 6d 62 65 72 20 61 | 6e 64 20 69 74 20 64 6f |number a|nd it do|
|00001f30| 65 73 20 6e 6f 74 20 63 | 6f 6e 66 6f 72 6d 20 74 |es not c|onform t|
|00001f40| 6f 20 74 68 65 20 6e 75 | 6d 65 72 69 63 20 73 74 |o the nu|meric st|
|00001f50| 72 69 6e 67 0a 20 20 20 | 20 73 79 6e 74 61 78 2e |ring. | syntax.|
|00001f60| 20 20 54 68 65 20 72 65 | 73 75 6c 74 20 69 73 20 | The re|sult is |
|00001f70| 5b 30 2c 71 4e 61 4e 5d | 2e 0a 20 20 20 20 63 02 |[0,qNaN]|.. c.|
|00001f80| 00 00 00 03 00 00 00 01 | 00 00 00 47 00 00 00 73 |........|...G...s|
|00001f90| 04 00 00 00 74 00 00 53 | 28 01 00 00 00 4e 28 01 |....t..S|(....N(.|
|00001fa0| 00 00 00 52 29 00 00 00 | 28 03 00 00 00 52 1d 00 |...R)...|(....R..|
|00001fb0| 00 00 52 1e 00 00 00 52 | 1b 00 00 00 28 00 00 00 |..R....R|....(...|
|00001fc0| 00 28 00 00 00 00 73 1d | 00 00 00 2f 75 73 72 2f |.(....s.|.../usr/|
|00001fd0| 6c 69 62 2f 70 79 74 68 | 6f 6e 32 2e 36 2f 64 65 |lib/pyth|on2.6/de|
|00001fe0| 63 69 6d 61 6c 2e 70 79 | 52 1f 00 00 00 e5 00 00 |cimal.py|R.......|
|00001ff0| 00 73 02 00 00 00 00 01 | 28 04 00 00 00 52 20 00 |.s......|(....R .|
|00002000| 00 00 52 21 00 00 00 52 | 22 00 00 00 52 1f 00 00 |..R!...R|"...R...|
|00002010| 00 28 00 00 00 00 28 00 | 00 00 00 28 00 00 00 00 |.(....(.|...(....|
|00002020| 73 1d 00 00 00 2f 75 73 | 72 2f 6c 69 62 2f 70 79 |s..../us|r/lib/py|
|00002030| 74 68 6f 6e 32 2e 36 2f | 64 65 63 69 6d 61 6c 2e |thon2.6/|decimal.|
|00002040| 70 79 52 2b 00 00 00 de | 00 00 00 73 04 00 00 00 |pyR+....|...s....|
|00002050| 06 06 06 01 63 00 00 00 | 00 00 00 00 00 01 00 00 |....c...|........|
|00002060| 00 42 00 00 00 73 17 00 | 00 00 65 00 00 5a 01 00 |.B...s..|..e..Z..|
|00002070| 64 00 00 5a 02 00 64 01 | 00 84 00 00 5a 03 00 52 |d..Z..d.|....Z..R|
|00002080| 53 28 02 00 00 00 73 b2 | 01 00 00 44 69 76 69 73 |S(....s.|...Divis|
|00002090| 69 6f 6e 20 62 79 20 30 | 2e 0a 0a 20 20 20 20 54 |ion by 0|... T|
|000020a0| 68 69 73 20 6f 63 63 75 | 72 73 20 61 6e 64 20 73 |his occu|rs and s|
|000020b0| 69 67 6e 61 6c 73 20 64 | 69 76 69 73 69 6f 6e 2d |ignals d|ivision-|
|000020c0| 62 79 2d 7a 65 72 6f 20 | 69 66 20 64 69 76 69 73 |by-zero |if divis|
|000020d0| 69 6f 6e 20 6f 66 20 61 | 20 66 69 6e 69 74 65 20 |ion of a| finite |
|000020e0| 6e 75 6d 62 65 72 0a 20 | 20 20 20 62 79 20 7a 65 |number. | by ze|
|000020f0| 72 6f 20 77 61 73 20 61 | 74 74 65 6d 70 74 65 64 |ro was a|ttempted|
|00002100| 20 28 64 75 72 69 6e 67 | 20 61 20 64 69 76 69 64 | (during| a divid|
|00002110| 65 2d 69 6e 74 65 67 65 | 72 20 6f 72 20 64 69 76 |e-intege|r or div|
|00002120| 69 64 65 20 6f 70 65 72 | 61 74 69 6f 6e 2c 20 6f |ide oper|ation, o|
|00002130| 72 20 61 0a 20 20 20 20 | 70 6f 77 65 72 20 6f 70 |r a. |power op|
|00002140| 65 72 61 74 69 6f 6e 20 | 77 69 74 68 20 6e 65 67 |eration |with neg|
|00002150| 61 74 69 76 65 20 72 69 | 67 68 74 2d 68 61 6e 64 |ative ri|ght-hand|
|00002160| 20 6f 70 65 72 61 6e 64 | 29 2c 20 61 6e 64 20 74 | operand|), and t|
|00002170| 68 65 20 64 69 76 69 64 | 65 6e 64 20 77 61 73 0a |he divid|end was.|
|00002180| 20 20 20 20 6e 6f 74 20 | 7a 65 72 6f 2e 0a 0a 20 | not |zero... |
|00002190| 20 20 20 54 68 65 20 72 | 65 73 75 6c 74 20 6f 66 | The r|esult of|
|000021a0| 20 74 68 65 20 6f 70 65 | 72 61 74 69 6f 6e 20 69 | the ope|ration i|
|000021b0| 73 20 5b 73 69 67 6e 2c | 69 6e 66 5d 2c 20 77 68 |s [sign,|inf], wh|
|000021c0| 65 72 65 20 73 69 67 6e | 20 69 73 20 74 68 65 20 |ere sign| is the |
|000021d0| 65 78 63 6c 75 73 69 76 | 65 0a 20 20 20 20 6f 72 |exclusiv|e. or|
|000021e0| 20 6f 66 20 74 68 65 20 | 73 69 67 6e 73 20 6f 66 | of the |signs of|
|000021f0| 20 74 68 65 20 6f 70 65 | 72 61 6e 64 73 20 66 6f | the ope|rands fo|
|00002200| 72 20 64 69 76 69 64 65 | 2c 20 6f 72 20 69 73 20 |r divide|, or is |
|00002210| 31 20 66 6f 72 20 61 6e | 20 6f 64 64 20 70 6f 77 |1 for an| odd pow|
|00002220| 65 72 20 6f 66 0a 20 20 | 20 20 2d 30 2c 20 66 6f |er of. | -0, fo|
|00002230| 72 20 70 6f 77 65 72 2e | 0a 20 20 20 20 63 03 00 |r power.|. c..|
|00002240| 00 00 04 00 00 00 02 00 | 00 00 47 00 00 00 73 08 |........|..G...s.|
|00002250| 00 00 00 74 00 00 7c 02 | 00 19 53 28 01 00 00 00 |...t..|.|..S(....|
|00002260| 4e 28 01 00 00 00 74 0f | 00 00 00 5f 53 69 67 6e |N(....t.|..._Sign|
|00002270| 65 64 49 6e 66 69 6e 69 | 74 79 28 04 00 00 00 52 |edInfini|ty(....R|
|00002280| 1d 00 00 00 52 1e 00 00 | 00 74 04 00 00 00 73 69 |....R...|.t....si|
|00002290| 67 6e 52 1b 00 00 00 28 | 00 00 00 00 28 00 00 00 |gnR....(|....(...|
|000022a0| 00 73 1d 00 00 00 2f 75 | 73 72 2f 6c 69 62 2f 70 |.s..../u|sr/lib/p|
|000022b0| 79 74 68 6f 6e 32 2e 36 | 2f 64 65 63 69 6d 61 6c |ython2.6|/decimal|
|000022c0| 2e 70 79 52 1f 00 00 00 | f5 00 00 00 73 02 00 00 |.pyR....|....s...|
|000022d0| 00 00 01 28 04 00 00 00 | 52 20 00 00 00 52 21 00 |...(....|R ...R!.|
|000022e0| 00 00 52 22 00 00 00 52 | 1f 00 00 00 28 00 00 00 |..R"...R|....(...|
|000022f0| 00 28 00 00 00 00 28 00 | 00 00 00 73 1d 00 00 00 |.(....(.|...s....|
|00002300| 2f 75 73 72 2f 6c 69 62 | 2f 70 79 74 68 6f 6e 32 |/usr/lib|/python2|
|00002310| 2e 36 2f 64 65 63 69 6d | 61 6c 2e 70 79 52 08 00 |.6/decim|al.pyR..|
|00002320| 00 00 e8 00 00 00 73 04 | 00 00 00 06 0b 06 02 74 |......s.|.......t|
|00002330| 12 00 00 00 44 69 76 69 | 73 69 6f 6e 49 6d 70 6f |....Divi|sionImpo|
|00002340| 73 73 69 62 6c 65 63 00 | 00 00 00 00 00 00 00 01 |ssiblec.|........|
|00002350| 00 00 00 42 00 00 00 73 | 17 00 00 00 65 00 00 5a |...B...s|....e..Z|
|00002360| 01 00 64 00 00 5a 02 00 | 64 01 00 84 00 00 5a 03 |..d..Z..|d.....Z.|
|00002370| 00 52 53 28 02 00 00 00 | 73 f3 00 00 00 43 61 6e |.RS(....|s....Can|
|00002380| 6e 6f 74 20 70 65 72 66 | 6f 72 6d 20 74 68 65 20 |not perf|orm the |
|00002390| 64 69 76 69 73 69 6f 6e | 20 61 64 65 71 75 61 74 |division| adequat|
|000023a0| 65 6c 79 2e 0a 0a 20 20 | 20 20 54 68 69 73 20 6f |ely... | This o|
|000023b0| 63 63 75 72 73 20 61 6e | 64 20 73 69 67 6e 61 6c |ccurs an|d signal|
|000023c0| 73 20 69 6e 76 61 6c 69 | 64 2d 6f 70 65 72 61 74 |s invali|d-operat|
|000023d0| 69 6f 6e 20 69 66 20 74 | 68 65 20 69 6e 74 65 67 |ion if t|he integ|
|000023e0| 65 72 20 72 65 73 75 6c | 74 20 6f 66 20 61 0a 20 |er resul|t of a. |
|000023f0| 20 20 20 64 69 76 69 64 | 65 2d 69 6e 74 65 67 65 | divid|e-intege|
|00002400| 72 20 6f 72 20 72 65 6d | 61 69 6e 64 65 72 20 6f |r or rem|ainder o|
|00002410| 70 65 72 61 74 69 6f 6e | 20 68 61 64 20 74 6f 6f |peration| had too|
|00002420| 20 6d 61 6e 79 20 64 69 | 67 69 74 73 20 28 77 6f | many di|gits (wo|
|00002430| 75 6c 64 20 62 65 0a 20 | 20 20 20 6c 6f 6e 67 65 |uld be. | longe|
|00002440| 72 20 74 68 61 6e 20 70 | 72 65 63 69 73 69 6f 6e |r than p|recision|
|00002450| 29 2e 20 20 54 68 65 20 | 72 65 73 75 6c 74 20 69 |). The |result i|
|00002460| 73 20 5b 30 2c 71 4e 61 | 4e 5d 2e 0a 20 20 20 20 |s [0,qNa|N].. |
|00002470| 63 02 00 00 00 03 00 00 | 00 01 00 00 00 47 00 00 |c.......|.....G..|
|00002480| 00 73 04 00 00 00 74 00 | 00 53 28 01 00 00 00 4e |.s....t.|.S(....N|
|00002490| 28 01 00 00 00 52 29 00 | 00 00 28 03 00 00 00 52 |(....R).|..(....R|
|000024a0| 1d 00 00 00 52 1e 00 00 | 00 52 1b 00 00 00 28 00 |....R...|.R....(.|
|000024b0| 00 00 00 28 00 00 00 00 | 73 1d 00 00 00 2f 75 73 |...(....|s..../us|
|000024c0| 72 2f 6c 69 62 2f 70 79 | 74 68 6f 6e 32 2e 36 2f |r/lib/py|thon2.6/|
|000024d0| 64 65 63 69 6d 61 6c 2e | 70 79 52 1f 00 00 00 00 |decimal.|pyR.....|
|000024e0| 01 00 00 73 02 00 00 00 | 00 01 28 04 00 00 00 52 |...s....|..(....R|
|000024f0| 20 00 00 00 52 21 00 00 | 00 52 22 00 00 00 52 1f | ...R!..|.R"...R.|
|00002500| 00 00 00 28 00 00 00 00 | 28 00 00 00 00 28 00 00 |...(....|(....(..|
|00002510| 00 00 73 1d 00 00 00 2f | 75 73 72 2f 6c 69 62 2f |..s..../|usr/lib/|
|00002520| 70 79 74 68 6f 6e 32 2e | 36 2f 64 65 63 69 6d 61 |python2.|6/decima|
|00002530| 6c 2e 70 79 52 2e 00 00 | 00 f8 00 00 00 73 04 00 |l.pyR...|.....s..|
|00002540| 00 00 06 06 06 02 74 11 | 00 00 00 44 69 76 69 73 |......t.|...Divis|
|00002550| 69 6f 6e 55 6e 64 65 66 | 69 6e 65 64 63 00 00 00 |ionUndef|inedc...|
|00002560| 00 00 00 00 00 01 00 00 | 00 42 00 00 00 73 17 00 |........|.B...s..|
|00002570| 00 00 65 00 00 5a 01 00 | 64 00 00 5a 02 00 64 01 |..e..Z..|d..Z..d.|
|00002580| 00 84 00 00 5a 03 00 52 | 53 28 02 00 00 00 73 ee |....Z..R|S(....s.|
|00002590| 00 00 00 55 6e 64 65 66 | 69 6e 65 64 20 72 65 73 |...Undef|ined res|
|000025a0| 75 6c 74 20 6f 66 20 64 | 69 76 69 73 69 6f 6e 2e |ult of d|ivision.|
|000025b0| 0a 0a 20 20 20 20 54 68 | 69 73 20 6f 63 63 75 72 |.. Th|is occur|
|000025c0| 73 20 61 6e 64 20 73 69 | 67 6e 61 6c 73 20 69 6e |s and si|gnals in|
|000025d0| 76 61 6c 69 64 2d 6f 70 | 65 72 61 74 69 6f 6e 20 |valid-op|eration |
|000025e0| 69 66 20 64 69 76 69 73 | 69 6f 6e 20 62 79 20 7a |if divis|ion by z|
|000025f0| 65 72 6f 20 77 61 73 0a | 20 20 20 20 61 74 74 65 |ero was.| atte|
|00002600| 6d 70 74 65 64 20 28 64 | 75 72 69 6e 67 20 61 20 |mpted (d|uring a |
|00002610| 64 69 76 69 64 65 2d 69 | 6e 74 65 67 65 72 2c 20 |divide-i|nteger, |
|00002620| 64 69 76 69 64 65 2c 20 | 6f 72 20 72 65 6d 61 69 |divide, |or remai|
|00002630| 6e 64 65 72 20 6f 70 65 | 72 61 74 69 6f 6e 29 2c |nder ope|ration),|
|00002640| 20 61 6e 64 0a 20 20 20 | 20 74 68 65 20 64 69 76 | and. | the div|
|00002650| 69 64 65 6e 64 20 69 73 | 20 61 6c 73 6f 20 7a 65 |idend is| also ze|
|00002660| 72 6f 2e 20 20 54 68 65 | 20 72 65 73 75 6c 74 20 |ro. The| result |
|00002670| 69 73 20 5b 30 2c 71 4e | 61 4e 5d 2e 0a 20 20 20 |is [0,qN|aN].. |
|00002680| 20 63 02 00 00 00 03 00 | 00 00 01 00 00 00 47 00 | c......|......G.|
|00002690| 00 00 73 04 00 00 00 74 | 00 00 53 28 01 00 00 00 |..s....t|..S(....|
|000026a0| 4e 28 01 00 00 00 52 29 | 00 00 00 28 03 00 00 00 |N(....R)|...(....|
|000026b0| 52 1d 00 00 00 52 1e 00 | 00 00 52 1b 00 00 00 28 |R....R..|..R....(|
|000026c0| 00 00 00 00 28 00 00 00 | 00 73 1d 00 00 00 2f 75 |....(...|.s..../u|
|000026d0| 73 72 2f 6c 69 62 2f 70 | 79 74 68 6f 6e 32 2e 36 |sr/lib/p|ython2.6|
|000026e0| 2f 64 65 63 69 6d 61 6c | 2e 70 79 52 1f 00 00 00 |/decimal|.pyR....|
|000026f0| 0b 01 00 00 73 02 00 00 | 00 00 01 28 04 00 00 00 |....s...|...(....|
|00002700| 52 20 00 00 00 52 21 00 | 00 00 52 22 00 00 00 52 |R ...R!.|..R"...R|
|00002710| 1f 00 00 00 28 00 00 00 | 00 28 00 00 00 00 28 00 |....(...|.(....(.|
|00002720| 00 00 00 73 1d 00 00 00 | 2f 75 73 72 2f 6c 69 62 |...s....|/usr/lib|
|00002730| 2f 70 79 74 68 6f 6e 32 | 2e 36 2f 64 65 63 69 6d |/python2|.6/decim|
|00002740| 61 6c 2e 70 79 52 2f 00 | 00 00 03 01 00 00 73 04 |al.pyR/.|......s.|
|00002750| 00 00 00 06 06 06 02 63 | 00 00 00 00 00 00 00 00 |.......c|........|
|00002760| 01 00 00 00 42 00 00 00 | 73 0e 00 00 00 65 00 00 |....B...|s....e..|
|00002770| 5a 01 00 64 00 00 5a 02 | 00 52 53 28 01 00 00 00 |Z..d..Z.|.RS(....|
|00002780| 73 ad 01 00 00 48 61 64 | 20 74 6f 20 72 6f 75 6e |s....Had| to roun|
|00002790| 64 2c 20 6c 6f 73 69 6e | 67 20 69 6e 66 6f 72 6d |d, losin|g inform|
|000027a0| 61 74 69 6f 6e 2e 0a 0a | 20 20 20 20 54 68 69 73 |ation...| This|
|000027b0| 20 6f 63 63 75 72 73 20 | 61 6e 64 20 73 69 67 6e | occurs |and sign|
|000027c0| 61 6c 73 20 69 6e 65 78 | 61 63 74 20 77 68 65 6e |als inex|act when|
|000027d0| 65 76 65 72 20 74 68 65 | 20 72 65 73 75 6c 74 20 |ever the| result |
|000027e0| 6f 66 20 61 6e 20 6f 70 | 65 72 61 74 69 6f 6e 20 |of an op|eration |
|000027f0| 69 73 0a 20 20 20 20 6e | 6f 74 20 65 78 61 63 74 |is. n|ot exact|
|00002800| 20 28 74 68 61 74 20 69 | 73 2c 20 69 74 20 6e 65 | (that i|s, it ne|
|00002810| 65 64 65 64 20 74 6f 20 | 62 65 20 72 6f 75 6e 64 |eded to |be round|
|00002820| 65 64 20 61 6e 64 20 61 | 6e 79 20 64 69 73 63 61 |ed and a|ny disca|
|00002830| 72 64 65 64 20 64 69 67 | 69 74 73 0a 20 20 20 20 |rded dig|its. |
|00002840| 77 65 72 65 20 6e 6f 6e | 2d 7a 65 72 6f 29 2c 20 |were non|-zero), |
|00002850| 6f 72 20 69 66 20 61 6e | 20 6f 76 65 72 66 6c 6f |or if an| overflo|
|00002860| 77 20 6f 72 20 75 6e 64 | 65 72 66 6c 6f 77 20 63 |w or und|erflow c|
|00002870| 6f 6e 64 69 74 69 6f 6e | 20 6f 63 63 75 72 73 2e |ondition| occurs.|
|00002880| 20 20 54 68 65 0a 20 20 | 20 20 72 65 73 75 6c 74 | The. | result|
|00002890| 20 69 6e 20 61 6c 6c 20 | 63 61 73 65 73 20 69 73 | in all |cases is|
|000028a0| 20 75 6e 63 68 61 6e 67 | 65 64 2e 0a 0a 20 20 20 | unchang|ed... |
|000028b0| 20 54 68 65 20 69 6e 65 | 78 61 63 74 20 73 69 67 | The ine|xact sig|
|000028c0| 6e 61 6c 20 6d 61 79 20 | 62 65 20 74 65 73 74 65 |nal may |be teste|
|000028d0| 64 20 28 6f 72 20 74 72 | 61 70 70 65 64 29 20 74 |d (or tr|apped) t|
|000028e0| 6f 20 64 65 74 65 72 6d | 69 6e 65 20 69 66 20 61 |o determ|ine if a|
|000028f0| 20 67 69 76 65 6e 0a 20 | 20 20 20 6f 70 65 72 61 | given. | opera|
|00002900| 74 69 6f 6e 20 28 6f 72 | 20 73 65 71 75 65 6e 63 |tion (or| sequenc|
|00002910| 65 20 6f 66 20 6f 70 65 | 72 61 74 69 6f 6e 73 29 |e of ope|rations)|
|00002920| 20 77 61 73 20 69 6e 65 | 78 61 63 74 2e 0a 20 20 | was ine|xact.. |
|00002930| 20 20 28 03 00 00 00 52 | 20 00 00 00 52 21 00 00 | (....R| ...R!..|
|00002940| 00 52 22 00 00 00 28 00 | 00 00 00 28 00 00 00 00 |.R"...(.|...(....|
|00002950| 28 00 00 00 00 73 1d 00 | 00 00 2f 75 73 72 2f 6c |(....s..|../usr/l|
|00002960| 69 62 2f 70 79 74 68 6f | 6e 32 2e 36 2f 64 65 63 |ib/pytho|n2.6/dec|
|00002970| 69 6d 61 6c 2e 70 79 52 | 09 00 00 00 0e 01 00 00 |imal.pyR|........|
|00002980| 73 02 00 00 00 06 0a 74 | 0e 00 00 00 49 6e 76 61 |s......t|....Inva|
|00002990| 6c 69 64 43 6f 6e 74 65 | 78 74 63 00 00 00 00 00 |lidConte|xtc.....|
|000029a0| 00 00 00 01 00 00 00 42 | 00 00 00 73 17 00 00 00 |.......B|...s....|
|000029b0| 65 00 00 5a 01 00 64 00 | 00 5a 02 00 64 01 00 84 |e..Z..d.|.Z..d...|
|000029c0| 00 00 5a 03 00 52 53 28 | 02 00 00 00 73 ec 01 00 |..Z..RS(|....s...|
|000029d0| 00 49 6e 76 61 6c 69 64 | 20 63 6f 6e 74 65 78 74 |.Invalid| context|
|000029e0| 2e 20 20 55 6e 6b 6e 6f | 77 6e 20 72 6f 75 6e 64 |. Unkno|wn round|
|000029f0| 69 6e 67 2c 20 66 6f 72 | 20 65 78 61 6d 70 6c 65 |ing, for| example|
|00002a00| 2e 0a 0a 20 20 20 20 54 | 68 69 73 20 6f 63 63 75 |... T|his occu|
|00002a10| 72 73 20 61 6e 64 20 73 | 69 67 6e 61 6c 73 20 69 |rs and s|ignals i|
|00002a20| 6e 76 61 6c 69 64 2d 6f | 70 65 72 61 74 69 6f 6e |nvalid-o|peration|
|00002a30| 20 69 66 20 61 6e 20 69 | 6e 76 61 6c 69 64 20 63 | if an i|nvalid c|
|00002a40| 6f 6e 74 65 78 74 20 77 | 61 73 0a 20 20 20 20 64 |ontext w|as. d|
|00002a50| 65 74 65 63 74 65 64 20 | 64 75 72 69 6e 67 20 61 |etected |during a|
|00002a60| 6e 20 6f 70 65 72 61 74 | 69 6f 6e 2e 20 20 54 68 |n operat|ion. Th|
|00002a70| 69 73 20 63 61 6e 20 6f | 63 63 75 72 20 69 66 20 |is can o|ccur if |
|00002a80| 63 6f 6e 74 65 78 74 73 | 20 61 72 65 20 6e 6f 74 |contexts| are not|
|00002a90| 20 63 68 65 63 6b 65 64 | 0a 20 20 20 20 6f 6e 20 | checked|. on |
|00002aa0| 63 72 65 61 74 69 6f 6e | 20 61 6e 64 20 65 69 74 |creation| and eit|
|00002ab0| 68 65 72 20 74 68 65 20 | 70 72 65 63 69 73 69 6f |her the |precisio|
|00002ac0| 6e 20 65 78 63 65 65 64 | 73 20 74 68 65 20 63 61 |n exceed|s the ca|
|00002ad0| 70 61 62 69 6c 69 74 79 | 20 6f 66 20 74 68 65 0a |pability| of the.|
|00002ae0| 20 20 20 20 75 6e 64 65 | 72 6c 79 69 6e 67 20 63 | unde|rlying c|
|00002af0| 6f 6e 63 72 65 74 65 20 | 72 65 70 72 65 73 65 6e |oncrete |represen|
|00002b00| 74 61 74 69 6f 6e 20 6f | 72 20 61 6e 20 75 6e 6b |tation o|r an unk|
|00002b10| 6e 6f 77 6e 20 6f 72 20 | 75 6e 73 75 70 70 6f 72 |nown or |unsuppor|
|00002b20| 74 65 64 20 72 6f 75 6e | 64 69 6e 67 0a 20 20 20 |ted roun|ding. |
|00002b30| 20 77 61 73 20 73 70 65 | 63 69 66 69 65 64 2e 20 | was spe|cified. |
|00002b40| 20 54 68 65 73 65 20 61 | 73 70 65 63 74 73 20 6f | These a|spects o|
|00002b50| 66 20 74 68 65 20 63 6f | 6e 74 65 78 74 20 6e 65 |f the co|ntext ne|
|00002b60| 65 64 20 6f 6e 6c 79 20 | 62 65 20 63 68 65 63 6b |ed only |be check|
|00002b70| 65 64 20 77 68 65 6e 0a | 20 20 20 20 74 68 65 20 |ed when.| the |
|00002b80| 76 61 6c 75 65 73 20 61 | 72 65 20 72 65 71 75 69 |values a|re requi|
|00002b90| 72 65 64 20 74 6f 20 62 | 65 20 75 73 65 64 2e 20 |red to b|e used. |
|00002ba0| 20 54 68 65 20 72 65 73 | 75 6c 74 20 69 73 20 5b | The res|ult is [|
|00002bb0| 30 2c 71 4e 61 4e 5d 2e | 0a 20 20 20 20 63 02 00 |0,qNaN].|. c..|
|00002bc0| 00 00 03 00 00 00 01 00 | 00 00 47 00 00 00 73 04 |........|..G...s.|
|00002bd0| 00 00 00 74 00 00 53 28 | 01 00 00 00 4e 28 01 00 |...t..S(|....N(..|
|00002be0| 00 00 52 29 00 00 00 28 | 03 00 00 00 52 1d 00 00 |..R)...(|....R...|
|00002bf0| 00 52 1e 00 00 00 52 1b | 00 00 00 28 00 00 00 00 |.R....R.|...(....|
|00002c00| 28 00 00 00 00 73 1d 00 | 00 00 2f 75 73 72 2f 6c |(....s..|../usr/l|
|00002c10| 69 62 2f 70 79 74 68 6f | 6e 32 2e 36 2f 64 65 63 |ib/pytho|n2.6/dec|
|00002c20| 69 6d 61 6c 2e 70 79 52 | 1f 00 00 00 25 01 00 00 |imal.pyR|....%...|
|00002c30| 73 02 00 00 00 00 01 28 | 04 00 00 00 52 20 00 00 |s......(|....R ..|
|00002c40| 00 52 21 00 00 00 52 22 | 00 00 00 52 1f 00 00 00 |.R!...R"|...R....|
|00002c50| 28 00 00 00 00 28 00 00 | 00 00 28 00 00 00 00 73 |(....(..|..(....s|
|00002c60| 1d 00 00 00 2f 75 73 72 | 2f 6c 69 62 2f 70 79 74 |..../usr|/lib/pyt|
|00002c70| 68 6f 6e 32 2e 36 2f 64 | 65 63 69 6d 61 6c 2e 70 |hon2.6/d|ecimal.p|
|00002c80| 79 52 30 00 00 00 1a 01 | 00 00 73 04 00 00 00 06 |yR0.....|..s.....|
|00002c90| 09 06 02 63 00 00 00 00 | 00 00 00 00 01 00 00 00 |...c....|........|
|00002ca0| 42 00 00 00 73 0e 00 00 | 00 65 00 00 5a 01 00 64 |B...s...|.e..Z..d|
|00002cb0| 00 00 5a 02 00 52 53 28 | 01 00 00 00 73 d9 01 00 |..Z..RS(|....s...|
|00002cc0| 00 4e 75 6d 62 65 72 20 | 67 6f 74 20 72 6f 75 6e |.Number |got roun|
|00002cd0| 64 65 64 20 28 6e 6f 74 | 20 20 6e 65 63 65 73 73 |ded (not| necess|
|00002ce0| 61 72 69 6c 79 20 63 68 | 61 6e 67 65 64 20 64 75 |arily ch|anged du|
|00002cf0| 72 69 6e 67 20 72 6f 75 | 6e 64 69 6e 67 29 2e 0a |ring rou|nding)..|
|00002d00| 0a 20 20 20 20 54 68 69 | 73 20 6f 63 63 75 72 73 |. Thi|s occurs|
|00002d10| 20 61 6e 64 20 73 69 67 | 6e 61 6c 73 20 72 6f 75 | and sig|nals rou|
|00002d20| 6e 64 65 64 20 77 68 65 | 6e 65 76 65 72 20 74 68 |nded whe|never th|
|00002d30| 65 20 72 65 73 75 6c 74 | 20 6f 66 20 61 6e 20 6f |e result| of an o|
|00002d40| 70 65 72 61 74 69 6f 6e | 20 69 73 0a 20 20 20 20 |peration| is. |
|00002d50| 72 6f 75 6e 64 65 64 20 | 28 74 68 61 74 20 69 73 |rounded |(that is|
|00002d60| 2c 20 73 6f 6d 65 20 7a | 65 72 6f 20 6f 72 20 6e |, some z|ero or n|
|00002d70| 6f 6e 2d 7a 65 72 6f 20 | 64 69 67 69 74 73 20 77 |on-zero |digits w|
|00002d80| 65 72 65 20 64 69 73 63 | 61 72 64 65 64 20 66 72 |ere disc|arded fr|
|00002d90| 6f 6d 20 74 68 65 0a 20 | 20 20 20 63 6f 65 66 66 |om the. | coeff|
|00002da0| 69 63 69 65 6e 74 29 2c | 20 6f 72 20 69 66 20 61 |icient),| or if a|
|00002db0| 6e 20 6f 76 65 72 66 6c | 6f 77 20 6f 72 20 75 6e |n overfl|ow or un|
|00002dc0| 64 65 72 66 6c 6f 77 20 | 63 6f 6e 64 69 74 69 6f |derflow |conditio|
|00002dd0| 6e 20 6f 63 63 75 72 73 | 2e 20 20 54 68 65 0a 20 |n occurs|. The. |
|00002de0| 20 20 20 72 65 73 75 6c | 74 20 69 6e 20 61 6c 6c | resul|t in all|
|00002df0| 20 63 61 73 65 73 20 69 | 73 20 75 6e 63 68 61 6e | cases i|s unchan|
|00002e00| 67 65 64 2e 0a 0a 20 20 | 20 20 54 68 65 20 72 6f |ged... | The ro|
|00002e10| 75 6e 64 65 64 20 73 69 | 67 6e 61 6c 20 6d 61 79 |unded si|gnal may|
|00002e20| 20 62 65 20 74 65 73 74 | 65 64 20 28 6f 72 20 74 | be test|ed (or t|
|00002e30| 72 61 70 70 65 64 29 20 | 74 6f 20 64 65 74 65 72 |rapped) |to deter|
|00002e40| 6d 69 6e 65 20 69 66 20 | 61 20 67 69 76 65 6e 0a |mine if |a given.|
|00002e50| 20 20 20 20 6f 70 65 72 | 61 74 69 6f 6e 20 28 6f | oper|ation (o|
|00002e60| 72 20 73 65 71 75 65 6e | 63 65 20 6f 66 20 6f 70 |r sequen|ce of op|
|00002e70| 65 72 61 74 69 6f 6e 73 | 29 20 63 61 75 73 65 64 |erations|) caused|
|00002e80| 20 61 20 6c 6f 73 73 20 | 6f 66 20 70 72 65 63 69 | a loss |of preci|
|00002e90| 73 69 6f 6e 2e 0a 20 20 | 20 20 28 03 00 00 00 52 |sion.. | (....R|
|00002ea0| 20 00 00 00 52 21 00 00 | 00 52 22 00 00 00 28 00 | ...R!..|.R"...(.|
|00002eb0| 00 00 00 28 00 00 00 00 | 28 00 00 00 00 73 1d 00 |...(....|(....s..|
|00002ec0| 00 00 2f 75 73 72 2f 6c | 69 62 2f 70 79 74 68 6f |../usr/l|ib/pytho|
|00002ed0| 6e 32 2e 36 2f 64 65 63 | 69 6d 61 6c 2e 70 79 52 |n2.6/dec|imal.pyR|
|00002ee0| 0a 00 00 00 28 01 00 00 | 73 02 00 00 00 06 0a 63 |....(...|s......c|
|00002ef0| 00 00 00 00 00 00 00 00 | 01 00 00 00 42 00 00 00 |........|....B...|
|00002f00| 73 0e 00 00 00 65 00 00 | 5a 01 00 64 00 00 5a 02 |s....e..|Z..d..Z.|
|00002f10| 00 52 53 28 01 00 00 00 | 73 98 01 00 00 45 78 70 |.RS(....|s....Exp|
|00002f20| 6f 6e 65 6e 74 20 3c 20 | 45 6d 69 6e 20 62 65 66 |onent < |Emin bef|
|00002f30| 6f 72 65 20 72 6f 75 6e | 64 69 6e 67 2e 0a 0a 20 |ore roun|ding... |
|00002f40| 20 20 20 54 68 69 73 20 | 6f 63 63 75 72 73 20 61 | This |occurs a|
|00002f50| 6e 64 20 73 69 67 6e 61 | 6c 73 20 73 75 62 6e 6f |nd signa|ls subno|
|00002f60| 72 6d 61 6c 20 77 68 65 | 6e 65 76 65 72 20 74 68 |rmal whe|never th|
|00002f70| 65 20 72 65 73 75 6c 74 | 20 6f 66 20 61 20 63 6f |e result| of a co|
|00002f80| 6e 76 65 72 73 69 6f 6e | 20 6f 72 0a 20 20 20 20 |nversion| or. |
|00002f90| 6f 70 65 72 61 74 69 6f | 6e 20 69 73 20 73 75 62 |operatio|n is sub|
|00002fa0| 6e 6f 72 6d 61 6c 20 28 | 74 68 61 74 20 69 73 2c |normal (|that is,|
|00002fb0| 20 69 74 73 20 61 64 6a | 75 73 74 65 64 20 65 78 | its adj|usted ex|
|00002fc0| 70 6f 6e 65 6e 74 20 69 | 73 20 6c 65 73 73 20 74 |ponent i|s less t|
|00002fd0| 68 61 6e 0a 20 20 20 20 | 45 6d 69 6e 2c 20 62 65 |han. |Emin, be|
|00002fe0| 66 6f 72 65 20 61 6e 79 | 20 72 6f 75 6e 64 69 6e |fore any| roundin|
|00002ff0| 67 29 2e 20 20 54 68 65 | 20 72 65 73 75 6c 74 20 |g). The| result |
|00003000| 69 6e 20 61 6c 6c 20 63 | 61 73 65 73 20 69 73 20 |in all c|ases is |
|00003010| 75 6e 63 68 61 6e 67 65 | 64 2e 0a 0a 20 20 20 20 |unchange|d... |
|00003020| 54 68 65 20 73 75 62 6e | 6f 72 6d 61 6c 20 73 69 |The subn|ormal si|
|00003030| 67 6e 61 6c 20 6d 61 79 | 20 62 65 20 74 65 73 74 |gnal may| be test|
|00003040| 65 64 20 28 6f 72 20 74 | 72 61 70 70 65 64 29 20 |ed (or t|rapped) |
|00003050| 74 6f 20 64 65 74 65 72 | 6d 69 6e 65 20 69 66 20 |to deter|mine if |
|00003060| 61 20 67 69 76 65 6e 0a | 20 20 20 20 6f 72 20 6f |a given.| or o|
|00003070| 70 65 72 61 74 69 6f 6e | 20 28 6f 72 20 73 65 71 |peration| (or seq|
|00003080| 75 65 6e 63 65 20 6f 66 | 20 6f 70 65 72 61 74 69 |uence of| operati|
|00003090| 6f 6e 73 29 20 79 69 65 | 6c 64 65 64 20 61 20 73 |ons) yie|lded a s|
|000030a0| 75 62 6e 6f 72 6d 61 6c | 20 72 65 73 75 6c 74 2e |ubnormal| result.|
|000030b0| 0a 20 20 20 20 28 03 00 | 00 00 52 20 00 00 00 52 |. (..|..R ...R|
|000030c0| 21 00 00 00 52 22 00 00 | 00 28 00 00 00 00 28 00 |!...R"..|.(....(.|
|000030d0| 00 00 00 28 00 00 00 00 | 73 1d 00 00 00 2f 75 73 |...(....|s..../us|
|000030e0| 72 2f 6c 69 62 2f 70 79 | 74 68 6f 6e 32 2e 36 2f |r/lib/py|thon2.6/|
|000030f0| 64 65 63 69 6d 61 6c 2e | 70 79 52 0b 00 00 00 34 |decimal.|pyR....4|
|00003100| 01 00 00 73 02 00 00 00 | 06 09 63 00 00 00 00 00 |...s....|..c.....|
|00003110| 00 00 00 01 00 00 00 42 | 00 00 00 73 17 00 00 00 |.......B|...s....|
|00003120| 65 00 00 5a 01 00 64 00 | 00 5a 02 00 64 01 00 84 |e..Z..d.|.Z..d...|
|00003130| 00 00 5a 03 00 52 53 28 | 02 00 00 00 73 1a 04 00 |..Z..RS(|....s...|
|00003140| 00 4e 75 6d 65 72 69 63 | 61 6c 20 6f 76 65 72 66 |.Numeric|al overf|
|00003150| 6c 6f 77 2e 0a 0a 20 20 | 20 20 54 68 69 73 20 6f |low... | This o|
|00003160| 63 63 75 72 73 20 61 6e | 64 20 73 69 67 6e 61 6c |ccurs an|d signal|
|00003170| 73 20 6f 76 65 72 66 6c | 6f 77 20 69 66 20 74 68 |s overfl|ow if th|
|00003180| 65 20 61 64 6a 75 73 74 | 65 64 20 65 78 70 6f 6e |e adjust|ed expon|
|00003190| 65 6e 74 20 6f 66 20 61 | 20 72 65 73 75 6c 74 0a |ent of a| result.|
|000031a0| 20 20 20 20 28 66 72 6f | 6d 20 61 20 63 6f 6e 76 | (fro|m a conv|
|000031b0| 65 72 73 69 6f 6e 20 6f | 72 20 66 72 6f 6d 20 61 |ersion o|r from a|
|000031c0| 6e 20 6f 70 65 72 61 74 | 69 6f 6e 20 74 68 61 74 |n operat|ion that|
|000031d0| 20 69 73 20 6e 6f 74 20 | 61 6e 20 61 74 74 65 6d | is not |an attem|
|000031e0| 70 74 20 74 6f 20 64 69 | 76 69 64 65 0a 20 20 20 |pt to di|vide. |
|000031f0| 20 62 79 20 7a 65 72 6f | 29 2c 20 61 66 74 65 72 | by zero|), after|
|00003200| 20 72 6f 75 6e 64 69 6e | 67 2c 20 77 6f 75 6c 64 | roundin|g, would|
|00003210| 20 62 65 20 67 72 65 61 | 74 65 72 20 74 68 61 6e | be grea|ter than|
|00003220| 20 74 68 65 20 6c 61 72 | 67 65 73 74 20 76 61 6c | the lar|gest val|
|00003230| 75 65 20 74 68 61 74 0a | 20 20 20 20 63 61 6e 20 |ue that.| can |
|00003240| 62 65 20 68 61 6e 64 6c | 65 64 20 62 79 20 74 68 |be handl|ed by th|
|00003250| 65 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |e implem|entation|
|00003260| 20 28 74 68 65 20 76 61 | 6c 75 65 20 45 6d 61 78 | (the va|lue Emax|
|00003270| 29 2e 0a 0a 20 20 20 20 | 54 68 65 20 72 65 73 75 |)... |The resu|
|00003280| 6c 74 20 64 65 70 65 6e | 64 73 20 6f 6e 20 74 68 |lt depen|ds on th|
|00003290| 65 20 72 6f 75 6e 64 69 | 6e 67 20 6d 6f 64 65 3a |e roundi|ng mode:|
|000032a0| 0a 0a 20 20 20 20 46 6f | 72 20 72 6f 75 6e 64 2d |.. Fo|r round-|
|000032b0| 68 61 6c 66 2d 75 70 20 | 61 6e 64 20 72 6f 75 6e |half-up |and roun|
|000032c0| 64 2d 68 61 6c 66 2d 65 | 76 65 6e 20 28 61 6e 64 |d-half-e|ven (and|
|000032d0| 20 66 6f 72 20 72 6f 75 | 6e 64 2d 68 61 6c 66 2d | for rou|nd-half-|
|000032e0| 64 6f 77 6e 20 61 6e 64 | 0a 20 20 20 20 72 6f 75 |down and|. rou|
|000032f0| 6e 64 2d 75 70 2c 20 69 | 66 20 69 6d 70 6c 65 6d |nd-up, i|f implem|
|00003300| 65 6e 74 65 64 29 2c 20 | 74 68 65 20 72 65 73 75 |ented), |the resu|
|00003310| 6c 74 20 6f 66 20 74 68 | 65 20 6f 70 65 72 61 74 |lt of th|e operat|
|00003320| 69 6f 6e 20 69 73 20 5b | 73 69 67 6e 2c 69 6e 66 |ion is [|sign,inf|
|00003330| 5d 2c 0a 20 20 20 20 77 | 68 65 72 65 20 73 69 67 |],. w|here sig|
|00003340| 6e 20 69 73 20 74 68 65 | 20 73 69 67 6e 20 6f 66 |n is the| sign of|
|00003350| 20 74 68 65 20 69 6e 74 | 65 72 6d 65 64 69 61 74 | the int|ermediat|
|00003360| 65 20 72 65 73 75 6c 74 | 2e 20 20 46 6f 72 20 72 |e result|. For r|
|00003370| 6f 75 6e 64 2d 64 6f 77 | 6e 2c 20 74 68 65 0a 20 |ound-dow|n, the. |
|00003380| 20 20 20 72 65 73 75 6c | 74 20 69 73 20 74 68 65 | resul|t is the|
|00003390| 20 6c 61 72 67 65 73 74 | 20 66 69 6e 69 74 65 20 | largest| finite |
|000033a0| 6e 75 6d 62 65 72 20 74 | 68 61 74 20 63 61 6e 20 |number t|hat can |
|000033b0| 62 65 20 72 65 70 72 65 | 73 65 6e 74 65 64 20 69 |be repre|sented i|
|000033c0| 6e 20 74 68 65 0a 20 20 | 20 20 63 75 72 72 65 6e |n the. | curren|
|000033d0| 74 20 70 72 65 63 69 73 | 69 6f 6e 2c 20 77 69 74 |t precis|ion, wit|
|000033e0| 68 20 74 68 65 20 73 69 | 67 6e 20 6f 66 20 74 68 |h the si|gn of th|
|000033f0| 65 20 69 6e 74 65 72 6d | 65 64 69 61 74 65 20 72 |e interm|ediate r|
|00003400| 65 73 75 6c 74 2e 20 20 | 46 6f 72 0a 20 20 20 20 |esult. |For. |
|00003410| 72 6f 75 6e 64 2d 63 65 | 69 6c 69 6e 67 2c 20 74 |round-ce|iling, t|
|00003420| 68 65 20 72 65 73 75 6c | 74 20 69 73 20 74 68 65 |he resul|t is the|
|00003430| 20 73 61 6d 65 20 61 73 | 20 66 6f 72 20 72 6f 75 | same as| for rou|
|00003440| 6e 64 2d 64 6f 77 6e 20 | 69 66 20 74 68 65 20 73 |nd-down |if the s|
|00003450| 69 67 6e 20 6f 66 0a 20 | 20 20 20 74 68 65 20 69 |ign of. | the i|
|00003460| 6e 74 65 72 6d 65 64 69 | 61 74 65 20 72 65 73 75 |ntermedi|ate resu|
|00003470| 6c 74 20 69 73 20 31 2c | 20 6f 72 20 69 73 20 5b |lt is 1,| or is [|
|00003480| 30 2c 69 6e 66 5d 20 6f | 74 68 65 72 77 69 73 65 |0,inf] o|therwise|
|00003490| 2e 20 20 46 6f 72 20 72 | 6f 75 6e 64 2d 66 6c 6f |. For r|ound-flo|
|000034a0| 6f 72 2c 0a 20 20 20 20 | 74 68 65 20 72 65 73 75 |or,. |the resu|
|000034b0| 6c 74 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |lt is th|e same a|
|000034c0| 73 20 66 6f 72 20 72 6f | 75 6e 64 2d 64 6f 77 6e |s for ro|und-down|
|000034d0| 20 69 66 20 74 68 65 20 | 73 69 67 6e 20 6f 66 20 | if the |sign of |
|000034e0| 74 68 65 20 69 6e 74 65 | 72 6d 65 64 69 61 74 65 |the inte|rmediate|
|000034f0| 0a 20 20 20 20 72 65 73 | 75 6c 74 20 69 73 20 30 |. res|ult is 0|
|00003500| 2c 20 6f 72 20 69 73 20 | 5b 31 2c 69 6e 66 5d 20 |, or is |[1,inf] |
|00003510| 6f 74 68 65 72 77 69 73 | 65 2e 20 20 49 6e 20 61 |otherwis|e. In a|
|00003520| 6c 6c 20 63 61 73 65 73 | 2c 20 49 6e 65 78 61 63 |ll cases|, Inexac|
|00003530| 74 20 61 6e 64 20 52 6f | 75 6e 64 65 64 0a 20 20 |t and Ro|unded. |
|00003540| 20 20 77 69 6c 6c 20 61 | 6c 73 6f 20 62 65 20 72 | will a|lso be r|
|00003550| 61 69 73 65 64 2e 0a 20 | 20 20 20 63 03 00 00 00 |aised.. | c....|
|00003560| 04 00 00 00 05 00 00 00 | 47 00 00 00 73 c1 00 00 |........|G...s...|
|00003570| 00 7c 01 00 69 00 00 74 | 01 00 74 02 00 74 03 00 |.|..i..t|..t..t..|
|00003580| 74 04 00 66 04 00 6a 06 | 00 6f 09 00 01 74 05 00 |t..f..j.|.o...t..|
|00003590| 7c 02 00 19 53 01 7c 02 | 00 64 01 00 6a 02 00 6f ||...S.|.|.d..j..o|
|000035a0| 3f 00 01 7c 01 00 69 00 | 00 74 06 00 6a 02 00 6f |?..|..i.|.t..j..o|
|000035b0| 09 00 01 74 05 00 7c 02 | 00 19 53 01 74 07 00 7c |...t..|.|..S.t..||
|000035c0| 02 00 64 02 00 7c 01 00 | 69 08 00 14 7c 01 00 69 |..d..|..|i...|..i|
|000035d0| 09 00 7c 01 00 69 08 00 | 18 64 03 00 17 83 03 00 |..|..i..|.d......|
|000035e0| 53 01 7c 02 00 64 03 00 | 6a 02 00 6f 3f 00 01 7c |S.|..d..|j..o?..||
|000035f0| 01 00 69 00 00 74 0a 00 | 6a 02 00 6f 09 00 01 74 |..i..t..|j..o...t|
|00003600| 05 00 7c 02 00 19 53 01 | 74 07 00 7c 02 00 64 02 |..|...S.|t..|..d.|
|00003610| 00 7c 01 00 69 08 00 14 | 7c 01 00 69 09 00 7c 01 |.|..i...||..i..|.|
|00003620| 00 69 08 00 18 64 03 00 | 17 83 03 00 53 01 64 00 |.i...d..|....S.d.|
|00003630| 00 53 28 04 00 00 00 4e | 69 00 00 00 00 74 01 00 |.S(....N|i....t..|
|00003640| 00 00 39 69 01 00 00 00 | 28 0b 00 00 00 74 08 00 |..9i....|(....t..|
|00003650| 00 00 72 6f 75 6e 64 69 | 6e 67 52 0f 00 00 00 52 |..roundi|ngR....R|
|00003660| 10 00 00 00 52 14 00 00 | 00 52 13 00 00 00 52 2c |....R...|.R....R,|
|00003670| 00 00 00 52 11 00 00 00 | 52 24 00 00 00 74 04 00 |...R....|R$...t..|
|00003680| 00 00 70 72 65 63 74 04 | 00 00 00 45 6d 61 78 52 |..prect.|...EmaxR|
|00003690| 12 00 00 00 28 04 00 00 | 00 52 1d 00 00 00 52 1e |....(...|.R....R.|
|000036a0| 00 00 00 52 2d 00 00 00 | 52 1b 00 00 00 28 00 00 |...R-...|R....(..|
|000036b0| 00 00 28 00 00 00 00 73 | 1d 00 00 00 2f 75 73 72 |..(....s|..../usr|
|000036c0| 2f 6c 69 62 2f 70 79 74 | 68 6f 6e 32 2e 36 2f 64 |/lib/pyt|hon2.6/d|
|000036d0| 65 63 69 6d 61 6c 2e 70 | 79 52 1f 00 00 00 55 01 |ecimal.p|yR....U.|
|000036e0| 00 00 73 1a 00 00 00 00 | 01 0c 01 10 01 09 01 0d |..s.....|........|
|000036f0| 01 10 01 09 01 10 01 16 | 01 0d 01 10 01 09 01 10 |........|........|
|00003700| 01 28 04 00 00 00 52 20 | 00 00 00 52 21 00 00 00 |.(....R |...R!...|
|00003710| 52 22 00 00 00 52 1f 00 | 00 00 28 00 00 00 00 28 |R"...R..|..(....(|
|00003720| 00 00 00 00 28 00 00 00 | 00 73 1d 00 00 00 2f 75 |....(...|.s..../u|
|00003730| 73 72 2f 6c 69 62 2f 70 | 79 74 68 6f 6e 32 2e 36 |sr/lib/p|ython2.6|
|00003740| 2f 64 65 63 69 6d 61 6c | 2e 70 79 52 0c 00 00 00 |/decimal|.pyR....|
|00003750| 3f 01 00 00 73 04 00 00 | 00 06 14 06 02 63 00 00 |?...s...|.....c..|
|00003760| 00 00 00 00 00 00 01 00 | 00 00 42 00 00 00 73 0e |........|..B...s.|
|00003770| 00 00 00 65 00 00 5a 01 | 00 64 00 00 5a 02 00 52 |...e..Z.|.d..Z..R|
|00003780| 53 28 01 00 00 00 73 78 | 02 00 00 4e 75 6d 65 72 |S(....sx|...Numer|
|00003790| 69 63 61 6c 20 75 6e 64 | 65 72 66 6c 6f 77 20 77 |ical und|erflow w|
|000037a0| 69 74 68 20 72 65 73 75 | 6c 74 20 72 6f 75 6e 64 |ith resu|lt round|
|000037b0| 65 64 20 74 6f 20 30 2e | 0a 0a 20 20 20 20 54 68 |ed to 0.|.. Th|
|000037c0| 69 73 20 6f 63 63 75 72 | 73 20 61 6e 64 20 73 69 |is occur|s and si|
|000037d0| 67 6e 61 6c 73 20 75 6e | 64 65 72 66 6c 6f 77 20 |gnals un|derflow |
|000037e0| 69 66 20 61 20 72 65 73 | 75 6c 74 20 69 73 20 69 |if a res|ult is i|
|000037f0| 6e 65 78 61 63 74 20 61 | 6e 64 20 74 68 65 0a 20 |nexact a|nd the. |
|00003800| 20 20 20 61 64 6a 75 73 | 74 65 64 20 65 78 70 6f | adjus|ted expo|
|00003810| 6e 65 6e 74 20 6f 66 20 | 74 68 65 20 72 65 73 75 |nent of |the resu|
|00003820| 6c 74 20 77 6f 75 6c 64 | 20 62 65 20 73 6d 61 6c |lt would| be smal|
|00003830| 6c 65 72 20 28 6d 6f 72 | 65 20 6e 65 67 61 74 69 |ler (mor|e negati|
|00003840| 76 65 29 20 74 68 61 6e | 0a 20 20 20 20 74 68 65 |ve) than|. the|
|00003850| 20 73 6d 61 6c 6c 65 73 | 74 20 76 61 6c 75 65 20 | smalles|t value |
|00003860| 74 68 61 74 20 63 61 6e | 20 62 65 20 68 61 6e 64 |that can| be hand|
|00003870| 6c 65 64 20 62 79 20 74 | 68 65 20 69 6d 70 6c 65 |led by t|he imple|
|00003880| 6d 65 6e 74 61 74 69 6f | 6e 20 28 74 68 65 20 76 |mentatio|n (the v|
|00003890| 61 6c 75 65 0a 20 20 20 | 20 45 6d 69 6e 29 2e 20 |alue. | Emin). |
|000038a0| 20 54 68 61 74 20 69 73 | 2c 20 74 68 65 20 72 65 | That is|, the re|
|000038b0| 73 75 6c 74 20 69 73 20 | 62 6f 74 68 20 69 6e 65 |sult is |both ine|
|000038c0| 78 61 63 74 20 61 6e 64 | 20 73 75 62 6e 6f 72 6d |xact and| subnorm|
|000038d0| 61 6c 2e 0a 0a 20 20 20 | 20 54 68 65 20 72 65 73 |al... | The res|
|000038e0| 75 6c 74 20 61 66 74 65 | 72 20 61 6e 20 75 6e 64 |ult afte|r an und|
|000038f0| 65 72 66 6c 6f 77 20 77 | 69 6c 6c 20 62 65 20 61 |erflow w|ill be a|
|00003900| 20 73 75 62 6e 6f 72 6d | 61 6c 20 6e 75 6d 62 65 | subnorm|al numbe|
|00003910| 72 20 72 6f 75 6e 64 65 | 64 2c 20 69 66 0a 20 20 |r rounde|d, if. |
|00003920| 20 20 6e 65 63 65 73 73 | 61 72 79 2c 20 73 6f 20 | necess|ary, so |
|00003930| 74 68 61 74 20 69 74 73 | 20 65 78 70 6f 6e 65 6e |that its| exponen|
|00003940| 74 20 69 73 20 6e 6f 74 | 20 6c 65 73 73 20 74 68 |t is not| less th|
|00003950| 61 6e 20 45 74 69 6e 79 | 2e 20 20 54 68 69 73 20 |an Etiny|. This |
|00003960| 6d 61 79 20 72 65 73 75 | 6c 74 0a 20 20 20 20 69 |may resu|lt. i|
|00003970| 6e 20 30 20 77 69 74 68 | 20 74 68 65 20 73 69 67 |n 0 with| the sig|
|00003980| 6e 20 6f 66 20 74 68 65 | 20 69 6e 74 65 72 6d 65 |n of the| interme|
|00003990| 64 69 61 74 65 20 72 65 | 73 75 6c 74 20 61 6e 64 |diate re|sult and|
|000039a0| 20 61 6e 20 65 78 70 6f | 6e 65 6e 74 20 6f 66 20 | an expo|nent of |
|000039b0| 45 74 69 6e 79 2e 0a 0a | 20 20 20 20 49 6e 20 61 |Etiny...| In a|
|000039c0| 6c 6c 20 63 61 73 65 73 | 2c 20 49 6e 65 78 61 63 |ll cases|, Inexac|
|000039d0| 74 2c 20 52 6f 75 6e 64 | 65 64 2c 20 61 6e 64 20 |t, Round|ed, and |
|000039e0| 53 75 62 6e 6f 72 6d 61 | 6c 20 77 69 6c 6c 20 61 |Subnorma|l will a|
|000039f0| 6c 73 6f 20 62 65 20 72 | 61 69 73 65 64 2e 0a 20 |lso be r|aised.. |
|00003a00| 20 20 20 28 03 00 00 00 | 52 20 00 00 00 52 21 00 | (....|R ...R!.|
|00003a10| 00 00 52 22 00 00 00 28 | 00 00 00 00 28 00 00 00 |..R"...(|....(...|
|00003a20| 00 28 00 00 00 00 73 1d | 00 00 00 2f 75 73 72 2f |.(....s.|.../usr/|
|00003a30| 6c 69 62 2f 70 79 74 68 | 6f 6e 32 2e 36 2f 64 65 |lib/pyth|on2.6/de|
|00003a40| 63 69 6d 61 6c 2e 70 79 | 52 0d 00 00 00 65 01 00 |cimal.py|R....e..|
|00003a50| 00 73 02 00 00 00 06 0d | 74 0d 00 00 00 4d 6f 63 |.s......|t....Moc|
|00003a60| 6b 54 68 72 65 61 64 69 | 6e 67 63 00 00 00 00 00 |kThreadi|ngc.....|
|00003a70| 00 00 00 02 00 00 00 42 | 00 00 00 73 14 00 00 00 |.......B|...s....|
|00003a80| 65 00 00 5a 01 00 65 02 | 00 64 00 00 84 01 00 5a |e..Z..e.|.d.....Z|
|00003a90| 03 00 52 53 28 01 00 00 | 00 63 02 00 00 00 02 00 |..RS(...|.c......|
|00003aa0| 00 00 02 00 00 00 43 00 | 00 00 73 0b 00 00 00 7c |......C.|..s....||
|00003ab0| 01 00 69 00 00 74 01 00 | 19 53 28 01 00 00 00 4e |..i..t..|.S(....N|
|00003ac0| 28 02 00 00 00 74 07 00 | 00 00 6d 6f 64 75 6c 65 |(....t..|..module|
|00003ad0| 73 52 20 00 00 00 28 02 | 00 00 00 52 1d 00 00 00 |sR ...(.|...R....|
|00003ae0| 74 03 00 00 00 73 79 73 | 28 00 00 00 00 28 00 00 |t....sys|(....(..|
|00003af0| 00 00 73 1d 00 00 00 2f | 75 73 72 2f 6c 69 62 2f |..s..../|usr/lib/|
|00003b00| 70 79 74 68 6f 6e 32 2e | 36 2f 64 65 63 69 6d 61 |python2.|6/decima|
|00003b10| 6c 2e 70 79 74 05 00 00 | 00 6c 6f 63 61 6c 8c 01 |l.pyt...|.local..|
|00003b20| 00 00 73 02 00 00 00 00 | 01 28 04 00 00 00 52 20 |..s.....|.(....R |
|00003b30| 00 00 00 52 21 00 00 00 | 52 37 00 00 00 52 38 00 |...R!...|R7...R8.|
|00003b40| 00 00 28 00 00 00 00 28 | 00 00 00 00 28 00 00 00 |..(....(|....(...|
|00003b50| 00 73 1d 00 00 00 2f 75 | 73 72 2f 6c 69 62 2f 70 |.s..../u|sr/lib/p|
|00003b60| 79 74 68 6f 6e 32 2e 36 | 2f 64 65 63 69 6d 61 6c |ython2.6|/decimal|
|00003b70| 2e 70 79 52 35 00 00 00 | 8b 01 00 00 73 02 00 00 |.pyR5...|....s...|
|00003b80| 00 06 01 74 13 00 00 00 | 5f 5f 64 65 63 69 6d 61 |...t....|__decima|
|00003b90| 6c 5f 63 6f 6e 74 65 78 | 74 5f 5f 63 01 00 00 00 |l_contex|t__c....|
|00003ba0| 01 00 00 00 04 00 00 00 | 43 00 00 00 73 43 00 00 |........|C...sC..|
|00003bb0| 00 7c 00 00 74 00 00 74 | 01 00 74 02 00 66 03 00 |.|..t..t|..t..f..|
|00003bc0| 6a 06 00 6f 1a 00 01 7c | 00 00 69 03 00 83 00 00 |j..o...||..i.....|
|00003bd0| 7d 00 00 7c 00 00 69 04 | 00 83 00 00 01 6e 01 00 |}..|..i.|.....n..|
|00003be0| 01 7c 00 00 74 05 00 69 | 06 00 83 00 00 5f 07 00 |.|..t..i|....._..|
|00003bf0| 64 01 00 53 28 02 00 00 | 00 73 25 00 00 00 53 65 |d..S(...|.s%...Se|
|00003c00| 74 20 74 68 69 73 20 74 | 68 72 65 61 64 27 73 20 |t this t|hread's |
|00003c10| 63 6f 6e 74 65 78 74 20 | 74 6f 20 63 6f 6e 74 65 |context |to conte|
|00003c20| 78 74 2e 4e 28 08 00 00 | 00 52 02 00 00 00 52 03 |xt.N(...|.R....R.|
|00003c30| 00 00 00 52 04 00 00 00 | 74 04 00 00 00 63 6f 70 |...R....|t....cop|
|00003c40| 79 74 0b 00 00 00 63 6c | 65 61 72 5f 66 6c 61 67 |yt....cl|ear_flag|
|00003c50| 73 74 09 00 00 00 74 68 | 72 65 61 64 69 6e 67 74 |st....th|readingt|
|00003c60| 0d 00 00 00 63 75 72 72 | 65 6e 74 54 68 72 65 61 |....curr|entThrea|
|00003c70| 64 52 39 00 00 00 28 01 | 00 00 00 52 1e 00 00 00 |dR9...(.|...R....|
|00003c80| 28 00 00 00 00 28 00 00 | 00 00 73 1d 00 00 00 2f |(....(..|..s..../|
|00003c90| 75 73 72 2f 6c 69 62 2f | 70 79 74 68 6f 6e 32 2e |usr/lib/|python2.|
|00003ca0| 36 2f 64 65 63 69 6d 61 | 6c 2e 70 79 52 16 00 00 |6/decima|l.pyR...|
|00003cb0| 00 9b 01 00 00 73 08 00 | 00 00 00 02 16 01 0c 01 |.....s..|........|
|00003cc0| 0e 01 63 00 00 00 00 01 | 00 00 00 05 00 00 00 43 |..c.....|.......C|
|00003cd0| 00 00 00 73 44 00 00 00 | 79 11 00 74 00 00 69 01 |...sD...|y..t..i.|
|00003ce0| 00 83 00 00 69 02 00 53 | 57 6e 2c 00 04 74 03 00 |....i..S|Wn,..t..|
|00003cf0| 6a 0a 00 6f 20 00 01 01 | 01 01 74 04 00 83 00 00 |j..o ...|..t.....|
|00003d00| 7d 00 00 7c 00 00 74 00 | 00 69 01 00 83 00 00 5f |}..|..t.|.i....._|
|00003d10| 02 00 7c 00 00 53 01 58 | 64 01 00 53 28 02 00 00 |..|..S.X|d..S(...|
|00003d20| 00 73 cd 00 00 00 52 65 | 74 75 72 6e 73 20 74 68 |.s....Re|turns th|
|00003d30| 69 73 20 74 68 72 65 61 | 64 27 73 20 63 6f 6e 74 |is threa|d's cont|
|00003d40| 65 78 74 2e 0a 0a 20 20 | 20 20 20 20 20 20 49 66 |ext... | If|
|00003d50| 20 74 68 69 73 20 74 68 | 72 65 61 64 20 64 6f 65 | this th|read doe|
|00003d60| 73 20 6e 6f 74 20 79 65 | 74 20 68 61 76 65 20 61 |s not ye|t have a|
|00003d70| 20 63 6f 6e 74 65 78 74 | 2c 20 72 65 74 75 72 6e | context|, return|
|00003d80| 73 0a 20 20 20 20 20 20 | 20 20 61 20 6e 65 77 20 |s. | a new |
|00003d90| 63 6f 6e 74 65 78 74 20 | 61 6e 64 20 73 65 74 73 |context |and sets|
|00003da0| 20 74 68 69 73 20 74 68 | 72 65 61 64 27 73 20 63 | this th|read's c|
|00003db0| 6f 6e 74 65 78 74 2e 0a | 20 20 20 20 20 20 20 20 |ontext..| |
|00003dc0| 4e 65 77 20 63 6f 6e 74 | 65 78 74 73 20 61 72 65 |New cont|exts are|
|00003dd0| 20 63 6f 70 69 65 73 20 | 6f 66 20 44 65 66 61 75 | copies |of Defau|
|00003de0| 6c 74 43 6f 6e 74 65 78 | 74 2e 0a 20 20 20 20 20 |ltContex|t.. |
|00003df0| 20 20 20 4e 28 05 00 00 | 00 52 3c 00 00 00 52 3d | N(...|.R<...R=|
|00003e00| 00 00 00 52 39 00 00 00 | 74 0e 00 00 00 41 74 74 |...R9...|t....Att|
|00003e10| 72 69 62 75 74 65 45 72 | 72 6f 72 52 01 00 00 00 |ributeEr|rorR....|
|00003e20| 28 01 00 00 00 52 1e 00 | 00 00 28 00 00 00 00 28 |(....R..|..(....(|
|00003e30| 00 00 00 00 73 1d 00 00 | 00 2f 75 73 72 2f 6c 69 |....s...|./usr/li|
|00003e40| 62 2f 70 79 74 68 6f 6e | 32 2e 36 2f 64 65 63 69 |b/python|2.6/deci|
|00003e50| 6d 61 6c 2e 70 79 52 17 | 00 00 00 a2 01 00 00 73 |mal.pyR.|.......s|
|00003e60| 0c 00 00 00 00 07 03 01 | 11 01 0e 01 09 01 0f 01 |........|........|
|00003e70| 63 01 00 00 00 02 00 00 | 00 05 00 00 00 43 00 00 |c.......|.....C..|
|00003e80| 00 73 38 00 00 00 79 0b | 00 7c 00 00 69 00 00 53 |.s8...y.|.|..i..S|
|00003e90| 57 6e 26 00 04 74 01 00 | 6a 0a 00 6f 1a 00 01 01 |Wn&..t..|j..o....|
|00003ea0| 01 01 74 02 00 83 00 00 | 7d 01 00 7c 01 00 7c 00 |..t.....|}..|..|.|
|00003eb0| 00 5f 00 00 7c 01 00 53 | 01 58 64 01 00 53 28 02 |._..|..S|.Xd..S(.|
|00003ec0| 00 00 00 73 cd 00 00 00 | 52 65 74 75 72 6e 73 20 |...s....|Returns |
|00003ed0| 74 68 69 73 20 74 68 72 | 65 61 64 27 73 20 63 6f |this thr|ead's co|
|00003ee0| 6e 74 65 78 74 2e 0a 0a | 20 20 20 20 20 20 20 20 |ntext...| |
|00003ef0| 49 66 20 74 68 69 73 20 | 74 68 72 65 61 64 20 64 |If this |thread d|
|00003f00| 6f 65 73 20 6e 6f 74 20 | 79 65 74 20 68 61 76 65 |oes not |yet have|
|00003f10| 20 61 20 63 6f 6e 74 65 | 78 74 2c 20 72 65 74 75 | a conte|xt, retu|
|00003f20| 72 6e 73 0a 20 20 20 20 | 20 20 20 20 61 20 6e 65 |rns. | a ne|
|00003f30| 77 20 63 6f 6e 74 65 78 | 74 20 61 6e 64 20 73 65 |w contex|t and se|
|00003f40| 74 73 20 74 68 69 73 20 | 74 68 72 65 61 64 27 73 |ts this |thread's|
|00003f50| 20 63 6f 6e 74 65 78 74 | 2e 0a 20 20 20 20 20 20 | context|.. |
|00003f60| 20 20 4e 65 77 20 63 6f | 6e 74 65 78 74 73 20 61 | New co|ntexts a|
|00003f70| 72 65 20 63 6f 70 69 65 | 73 20 6f 66 20 44 65 66 |re copie|s of Def|
|00003f80| 61 75 6c 74 43 6f 6e 74 | 65 78 74 2e 0a 20 20 20 |aultCont|ext.. |
|00003f90| 20 20 20 20 20 4e 28 03 | 00 00 00 52 39 00 00 00 | N(.|...R9...|
|00003fa0| 52 3e 00 00 00 52 01 00 | 00 00 28 02 00 00 00 74 |R>...R..|..(....t|
|00003fb0| 06 00 00 00 5f 6c 6f 63 | 61 6c 52 1e 00 00 00 28 |...._loc|alR....(|
|00003fc0| 00 00 00 00 28 00 00 00 | 00 73 1d 00 00 00 2f 75 |....(...|.s..../u|
|00003fd0| 73 72 2f 6c 69 62 2f 70 | 79 74 68 6f 6e 32 2e 36 |sr/lib/p|ython2.6|
|00003fe0| 2f 64 65 63 69 6d 61 6c | 2e 70 79 52 17 00 00 00 |/decimal|.pyR....|
|00003ff0| b6 01 00 00 73 0c 00 00 | 00 00 07 03 01 0b 01 0e |....s...|........|
|00004000| 01 09 01 09 01 63 02 00 | 00 00 02 00 00 00 04 00 |.....c..|........|
|00004010| 00 00 43 00 00 00 73 3d | 00 00 00 7c 00 00 74 00 |..C...s=|...|..t.|
|00004020| 00 74 01 00 74 02 00 66 | 03 00 6a 06 00 6f 1a 00 |.t..t..f|..j..o..|
|00004030| 01 7c 00 00 69 03 00 83 | 00 00 7d 00 00 7c 00 00 |.|..i...|..}..|..|
|00004040| 69 04 00 83 00 00 01 6e | 01 00 01 7c 00 00 7c 01 |i......n|...|..|.|
|00004050| 00 5f 05 00 64 01 00 53 | 28 02 00 00 00 73 25 00 |._..d..S|(....s%.|
|00004060| 00 00 53 65 74 20 74 68 | 69 73 20 74 68 72 65 61 |..Set th|is threa|
|00004070| 64 27 73 20 63 6f 6e 74 | 65 78 74 20 74 6f 20 63 |d's cont|ext to c|
|00004080| 6f 6e 74 65 78 74 2e 4e | 28 06 00 00 00 52 02 00 |ontext.N|(....R..|
|00004090| 00 00 52 03 00 00 00 52 | 04 00 00 00 52 3a 00 00 |..R....R|....R:..|
|000040a0| 00 52 3b 00 00 00 52 39 | 00 00 00 28 02 00 00 00 |.R;...R9|...(....|
|000040b0| 52 1e 00 00 00 52 3f 00 | 00 00 28 00 00 00 00 28 |R....R?.|..(....(|
|000040c0| 00 00 00 00 73 1d 00 00 | 00 2f 75 73 72 2f 6c 69 |....s...|./usr/li|
|000040d0| 62 2f 70 79 74 68 6f 6e | 32 2e 36 2f 64 65 63 69 |b/python|2.6/deci|
|000040e0| 6d 61 6c 2e 70 79 52 16 | 00 00 00 c4 01 00 00 73 |mal.pyR.|.......s|
|000040f0| 08 00 00 00 00 02 16 01 | 0c 01 0e 01 63 01 00 00 |........|....c...|
|00004100| 00 01 00 00 00 02 00 00 | 00 43 00 00 00 73 24 00 |........|.C...s$.|
|00004110| 00 00 7c 00 00 64 01 00 | 6a 08 00 6f 0d 00 01 74 |..|..d..|j..o...t|
|00004120| 01 00 83 00 00 7d 00 00 | 6e 01 00 01 74 02 00 7c |.....}..|n...t..||
|00004130| 00 00 83 01 00 53 28 02 | 00 00 00 73 5e 04 00 00 |.....S(.|...s^...|
|00004140| 52 65 74 75 72 6e 20 61 | 20 63 6f 6e 74 65 78 74 |Return a| context|
|00004150| 20 6d 61 6e 61 67 65 72 | 20 66 6f 72 20 61 20 63 | manager| for a c|
|00004160| 6f 70 79 20 6f 66 20 74 | 68 65 20 73 75 70 70 6c |opy of t|he suppl|
|00004170| 69 65 64 20 63 6f 6e 74 | 65 78 74 0a 0a 20 20 20 |ied cont|ext.. |
|00004180| 20 55 73 65 73 20 61 20 | 63 6f 70 79 20 6f 66 20 | Uses a |copy of |
|00004190| 74 68 65 20 63 75 72 72 | 65 6e 74 20 63 6f 6e 74 |the curr|ent cont|
|000041a0| 65 78 74 20 69 66 20 6e | 6f 20 63 6f 6e 74 65 78 |ext if n|o contex|
|000041b0| 74 20 69 73 20 73 70 65 | 63 69 66 69 65 64 0a 20 |t is spe|cified. |
|000041c0| 20 20 20 54 68 65 20 72 | 65 74 75 72 6e 65 64 20 | The r|eturned |
|000041d0| 63 6f 6e 74 65 78 74 20 | 6d 61 6e 61 67 65 72 20 |context |manager |
|000041e0| 63 72 65 61 74 65 73 20 | 61 20 6c 6f 63 61 6c 20 |creates |a local |
|000041f0| 64 65 63 69 6d 61 6c 20 | 63 6f 6e 74 65 78 74 0a |decimal |context.|
|00004200| 20 20 20 20 69 6e 20 61 | 20 77 69 74 68 20 73 74 | in a| with st|
|00004210| 61 74 65 6d 65 6e 74 3a | 0a 20 20 20 20 20 20 20 |atement:|. |
|00004220| 20 64 65 66 20 73 69 6e | 28 78 29 3a 0a 20 20 20 | def sin|(x):. |
|00004230| 20 20 20 20 20 20 20 20 | 20 20 77 69 74 68 20 6c | | with l|
|00004240| 6f 63 61 6c 63 6f 6e 74 | 65 78 74 28 29 20 61 73 |ocalcont|ext() as|
|00004250| 20 63 74 78 3a 0a 20 20 | 20 20 20 20 20 20 20 20 | ctx:. | |
|00004260| 20 20 20 20 20 20 20 63 | 74 78 2e 70 72 65 63 20 | c|tx.prec |
|00004270| 2b 3d 20 32 0a 20 20 20 | 20 20 20 20 20 20 20 20 |+= 2. | |
|00004280| 20 20 20 20 20 20 23 20 | 52 65 73 74 20 6f 66 20 | # |Rest of |
|00004290| 73 69 6e 20 63 61 6c 63 | 75 6c 61 74 69 6f 6e 20 |sin calc|ulation |
|000042a0| 61 6c 67 6f 72 69 74 68 | 6d 0a 20 20 20 20 20 20 |algorith|m. |
|000042b0| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 75 73 65 | | # use|
|000042c0| 73 20 61 20 70 72 65 63 | 69 73 69 6f 6e 20 32 20 |s a prec|ision 2 |
|000042d0| 67 72 65 61 74 65 72 20 | 74 68 61 6e 20 6e 6f 72 |greater |than nor|
|000042e0| 6d 61 6c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |mal. | |
|000042f0| 20 72 65 74 75 72 6e 20 | 2b 73 20 20 23 20 43 6f | return |+s # Co|
|00004300| 6e 76 65 72 74 20 72 65 | 73 75 6c 74 20 74 6f 20 |nvert re|sult to |
|00004310| 6e 6f 72 6d 61 6c 20 70 | 72 65 63 69 73 69 6f 6e |normal p|recision|
|00004320| 0a 0a 20 20 20 20 20 20 | 20 20 20 64 65 66 20 73 |.. | def s|
|00004330| 69 6e 28 78 29 3a 0a 20 | 20 20 20 20 20 20 20 20 |in(x):. | |
|00004340| 20 20 20 20 77 69 74 68 | 20 6c 6f 63 61 6c 63 6f | with| localco|
|00004350| 6e 74 65 78 74 28 45 78 | 74 65 6e 64 65 64 43 6f |ntext(Ex|tendedCo|
|00004360| 6e 74 65 78 74 29 3a 0a | 20 20 20 20 20 20 20 20 |ntext):.| |
|00004370| 20 20 20 20 20 20 20 20 | 20 23 20 52 65 73 74 20 | | # Rest |
|00004380| 6f 66 20 73 69 6e 20 63 | 61 6c 63 75 6c 61 74 69 |of sin c|alculati|
|00004390| 6f 6e 20 61 6c 67 6f 72 | 69 74 68 6d 0a 20 20 20 |on algor|ithm. |
|000043a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 20 | | # |
|000043b0| 75 73 65 73 20 74 68 65 | 20 45 78 74 65 6e 64 65 |uses the| Extende|
|000043c0| 64 20 43 6f 6e 74 65 78 | 74 20 66 72 6f 6d 20 74 |d Contex|t from t|
|000043d0| 68 65 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |he. | |
|000043e0| 20 20 20 20 23 20 47 65 | 6e 65 72 61 6c 20 44 65 | # Ge|neral De|
|000043f0| 63 69 6d 61 6c 20 41 72 | 69 74 68 6d 65 74 69 63 |cimal Ar|ithmetic|
|00004400| 20 53 70 65 63 69 66 69 | 63 61 74 69 6f 6e 0a 20 | Specifi|cation. |
|00004410| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 74 75 | | retu|
|00004420| 72 6e 20 2b 73 20 20 23 | 20 43 6f 6e 76 65 72 74 |rn +s #| Convert|
|00004430| 20 72 65 73 75 6c 74 20 | 74 6f 20 6e 6f 72 6d 61 | result |to norma|
|00004440| 6c 20 63 6f 6e 74 65 78 | 74 0a 0a 20 20 20 20 3e |l contex|t.. >|
|00004450| 3e 3e 20 73 65 74 63 6f | 6e 74 65 78 74 28 44 65 |>> setco|ntext(De|
|00004460| 66 61 75 6c 74 43 6f 6e | 74 65 78 74 29 0a 20 20 |faultCon|text). |
|00004470| 20 20 3e 3e 3e 20 70 72 | 69 6e 74 20 67 65 74 63 | >>> pr|int getc|
|00004480| 6f 6e 74 65 78 74 28 29 | 2e 70 72 65 63 0a 20 20 |ontext()|.prec. |
|00004490| 20 20 32 38 0a 20 20 20 | 20 3e 3e 3e 20 77 69 74 | 28. | >>> wit|
|000044a0| 68 20 6c 6f 63 61 6c 63 | 6f 6e 74 65 78 74 28 29 |h localc|ontext()|
|000044b0| 3a 0a 20 20 20 20 2e 2e | 2e 20 20 20 20 20 63 74 |:. ..|. ct|
|000044c0| 78 20 3d 20 67 65 74 63 | 6f 6e 74 65 78 74 28 29 |x = getc|ontext()|
|000044d0| 0a 20 20 20 20 2e 2e 2e | 20 20 20 20 20 63 74 78 |. ...| ctx|
|000044e0| 2e 70 72 65 63 20 2b 3d | 20 32 0a 20 20 20 20 2e |.prec +=| 2. .|
|000044f0| 2e 2e 20 20 20 20 20 70 | 72 69 6e 74 20 63 74 78 |.. p|rint ctx|
|00004500| 2e 70 72 65 63 0a 20 20 | 20 20 2e 2e 2e 0a 20 20 |.prec. | .... |
|00004510| 20 20 33 30 0a 20 20 20 | 20 3e 3e 3e 20 77 69 74 | 30. | >>> wit|
|00004520| 68 20 6c 6f 63 61 6c 63 | 6f 6e 74 65 78 74 28 45 |h localc|ontext(E|
|00004530| 78 74 65 6e 64 65 64 43 | 6f 6e 74 65 78 74 29 3a |xtendedC|ontext):|
|00004540| 0a 20 20 20 20 2e 2e 2e | 20 20 20 20 20 70 72 69 |. ...| pri|
|00004550| 6e 74 20 67 65 74 63 6f | 6e 74 65 78 74 28 29 2e |nt getco|ntext().|
|00004560| 70 72 65 63 0a 20 20 20 | 20 2e 2e 2e 0a 20 20 20 |prec. | .... |
|00004570| 20 39 0a 20 20 20 20 3e | 3e 3e 20 70 72 69 6e 74 | 9. >|>> print|
|00004580| 20 67 65 74 63 6f 6e 74 | 65 78 74 28 29 2e 70 72 | getcont|ext().pr|
|00004590| 65 63 0a 20 20 20 20 32 | 38 0a 20 20 20 20 4e 28 |ec. 2|8. N(|
|000045a0| 03 00 00 00 74 04 00 00 | 00 4e 6f 6e 65 52 17 00 |....t...|.NoneR..|
|000045b0| 00 00 74 0f 00 00 00 5f | 43 6f 6e 74 65 78 74 4d |..t...._|ContextM|
|000045c0| 61 6e 61 67 65 72 28 01 | 00 00 00 74 03 00 00 00 |anager(.|...t....|
|000045d0| 63 74 78 28 00 00 00 00 | 28 00 00 00 00 73 1d 00 |ctx(....|(....s..|
|000045e0| 00 00 2f 75 73 72 2f 6c | 69 62 2f 70 79 74 68 6f |../usr/l|ib/pytho|
|000045f0| 6e 32 2e 36 2f 64 65 63 | 69 6d 61 6c 2e 70 79 52 |n2.6/dec|imal.pyR|
|00004600| 18 00 00 00 cd 01 00 00 | 73 06 00 00 00 00 24 0d |........|s.....$.|
|00004610| 00 0d 01 63 00 00 00 00 | 00 00 00 00 04 00 00 00 |...c....|........|
|00004620| 42 00 00 00 73 21 05 00 | 00 65 00 00 5a 01 00 64 |B...s!..|.e..Z..d|
|00004630| 00 00 5a 02 00 64 78 00 | 5a 03 00 64 05 00 64 79 |..Z..dx.|Z..d..dy|
|00004640| 00 64 06 00 84 02 00 5a | 05 00 64 07 00 84 00 00 |.d.....Z|..d.....|
|00004650| 5a 06 00 64 08 00 84 00 | 00 5a 07 00 64 79 00 64 |Z..d....|.Z..dy.d|
|00004660| 79 00 64 09 00 84 02 00 | 5a 08 00 64 0a 00 84 00 |y.d.....|Z..d....|
|00004670| 00 5a 09 00 64 0b 00 84 | 00 00 5a 0a 00 64 0c 00 |.Z..d...|..Z..d..|
|00004680| 84 00 00 5a 0b 00 64 0d | 00 84 00 00 5a 0c 00 64 |...Z..d.|....Z..d|
|00004690| 0e 00 84 00 00 5a 0d 00 | 64 79 00 64 0f 00 84 01 |.....Z..|dy.d....|
|000046a0| 00 5a 0e 00 64 79 00 64 | 10 00 84 01 00 5a 0f 00 |.Z..dy.d|.....Z..|
|000046b0| 64 79 00 64 11 00 84 01 | 00 5a 10 00 64 79 00 64 |dy.d....|.Z..dy.d|
|000046c0| 12 00 84 01 00 5a 11 00 | 64 79 00 64 13 00 84 01 |.....Z..|dy.d....|
|000046d0| 00 5a 12 00 64 14 00 84 | 00 00 5a 13 00 64 15 00 |.Z..d...|..Z..d..|
|000046e0| 84 00 00 5a 14 00 64 16 | 00 84 00 00 5a 15 00 65 |...Z..d.|....Z..e|
|000046f0| 16 00 64 79 00 64 17 00 | 84 02 00 5a 17 00 64 79 |..dy.d..|...Z..dy|
|00004700| 00 64 18 00 84 01 00 5a | 18 00 64 79 00 64 19 00 |.d.....Z|..dy.d..|
|00004710| 84 01 00 5a 19 00 64 79 | 00 64 1a 00 84 01 00 5a |...Z..dy|.d.....Z|
|00004720| 1a 00 65 1b 00 64 79 00 | 64 1b 00 84 02 00 5a 1c |..e..dy.|d.....Z.|
|00004730| 00 64 79 00 64 1c 00 84 | 01 00 5a 1d 00 65 1d 00 |.dy.d...|..Z..e..|
|00004740| 5a 1e 00 64 79 00 64 1d | 00 84 01 00 5a 1f 00 64 |Z..dy.d.|....Z..d|
|00004750| 79 00 64 1e 00 84 01 00 | 5a 20 00 64 79 00 64 1f |y.d.....|Z .dy.d.|
|00004760| 00 84 01 00 5a 21 00 65 | 21 00 5a 22 00 64 79 00 |....Z!.e|!.Z".dy.|
|00004770| 64 20 00 84 01 00 5a 23 | 00 64 21 00 84 00 00 5a |d ....Z#|.d!....Z|
|00004780| 24 00 64 79 00 64 22 00 | 84 01 00 5a 25 00 65 23 |$.dy.d".|...Z%.e#|
|00004790| 00 5a 26 00 65 25 00 5a | 27 00 64 79 00 64 23 00 |.Z&.e%.Z|'.dy.d#.|
|000047a0| 84 01 00 5a 28 00 64 79 | 00 64 24 00 84 01 00 5a |...Z(.dy|.d$....Z|
|000047b0| 29 00 64 79 00 64 25 00 | 84 01 00 5a 2a 00 64 79 |).dy.d%.|...Z*.dy|
|000047c0| 00 64 26 00 84 01 00 5a | 2b 00 64 79 00 64 27 00 |.d&....Z|+.dy.d'.|
|000047d0| 84 01 00 5a 2c 00 64 79 | 00 64 28 00 84 01 00 5a |...Z,.dy|.d(....Z|
|000047e0| 2d 00 64 79 00 64 29 00 | 84 01 00 5a 2e 00 64 2a |-.dy.d).|...Z..d*|
|000047f0| 00 84 00 00 5a 2f 00 64 | 2b 00 84 00 00 5a 30 00 |....Z/.d|+....Z0.|
|00004800| 65 30 00 5a 31 00 64 2c | 00 84 00 00 5a 32 00 65 |e0.Z1.d,|....Z2.e|
|00004810| 33 00 65 32 00 83 01 00 | 5a 32 00 64 2d 00 84 00 |3.e2....|Z2.d-...|
|00004820| 00 5a 34 00 65 33 00 65 | 34 00 83 01 00 5a 34 00 |.Z4.e3.e|4....Z4.|
|00004830| 64 2e 00 84 00 00 5a 35 | 00 64 2f 00 84 00 00 5a |d.....Z5|.d/....Z|
|00004840| 36 00 64 30 00 84 00 00 | 5a 37 00 64 31 00 84 00 |6.d0....|Z7.d1...|
|00004850| 00 5a 38 00 64 32 00 84 | 00 00 5a 39 00 68 00 00 |.Z8.d2..|..Z9.h..|
|00004860| 5a 3a 00 64 33 00 84 00 | 00 5a 3b 00 64 34 00 84 |Z:.d3...|.Z;.d4..|
|00004870| 00 00 5a 3c 00 64 35 00 | 84 00 00 5a 3d 00 64 36 |..Z<.d5.|...Z=.d6|
|00004880| 00 84 00 00 5a 3e 00 64 | 37 00 84 00 00 5a 3f 00 |....Z>.d|7....Z?.|
|00004890| 64 38 00 84 00 00 5a 40 | 00 64 39 00 84 00 00 5a |d8....Z@|.d9....Z|
|000048a0| 41 00 64 3a 00 84 00 00 | 5a 42 00 64 79 00 64 3b |A.d:....|ZB.dy.d;|
|000048b0| 00 84 01 00 5a 43 00 64 | 79 00 64 3c 00 84 01 00 |....ZC.d|y.d<....|
|000048c0| 5a 44 00 64 3d 00 84 00 | 00 5a 45 00 64 79 00 64 |ZD.d=...|.ZE.dy.d|
|000048d0| 79 00 64 3e 00 84 02 00 | 5a 46 00 64 79 00 64 3f |y.d>....|ZF.dy.d?|
|000048e0| 00 84 01 00 5a 47 00 64 | 79 00 64 40 00 84 01 00 |....ZG.d|y.d@....|
|000048f0| 5a 48 00 64 79 00 64 79 | 00 65 1b 00 64 41 00 84 |ZH.dy.dy|.e..dA..|
|00004900| 03 00 5a 49 00 64 42 00 | 84 00 00 5a 4a 00 64 43 |..ZI.dB.|...ZJ.dC|
|00004910| 00 84 00 00 5a 4b 00 64 | 44 00 84 00 00 5a 4c 00 |....ZK.d|D....ZL.|
|00004920| 64 79 00 64 79 00 64 45 | 00 84 02 00 5a 4d 00 64 |dy.dy.dE|....ZM.d|
|00004930| 79 00 64 79 00 64 46 00 | 84 02 00 5a 4e 00 65 4e |y.dy.dF.|...ZN.eN|
|00004940| 00 5a 4f 00 64 79 00 64 | 47 00 84 01 00 5a 50 00 |.ZO.dy.d|G....ZP.|
|00004950| 64 79 00 64 48 00 84 01 | 00 5a 51 00 64 79 00 64 |dy.dH...|.ZQ.dy.d|
|00004960| 49 00 84 01 00 5a 52 00 | 64 4a 00 84 00 00 5a 53 |I....ZR.|dJ....ZS|
|00004970| 00 64 4b 00 84 00 00 5a | 54 00 64 4c 00 84 00 00 |.dK....Z|T.dL....|
|00004980| 5a 55 00 64 79 00 64 4d | 00 84 01 00 5a 56 00 64 |ZU.dy.dM|....ZV.d|
|00004990| 79 00 64 4e 00 84 01 00 | 5a 57 00 64 4f 00 84 00 |y.dN....|ZW.dO...|
|000049a0| 00 5a 58 00 64 50 00 84 | 00 00 5a 59 00 64 51 00 |.ZX.dP..|..ZY.dQ.|
|000049b0| 84 00 00 5a 5a 00 64 52 | 00 84 00 00 5a 5b 00 64 |...ZZ.dR|....Z[.d|
|000049c0| 53 00 84 00 00 5a 5c 00 | 64 79 00 64 54 00 84 01 |S....Z\.|dy.dT...|
|000049d0| 00 5a 5d 00 64 55 00 84 | 00 00 5a 5e 00 64 56 00 |.Z].dU..|..Z^.dV.|
|000049e0| 84 00 00 5a 5f 00 64 57 | 00 84 00 00 5a 60 00 64 |...Z_.dW|....Z`.d|
|000049f0| 58 00 84 00 00 5a 61 00 | 64 79 00 64 59 00 84 01 |X....Za.|dy.dY...|
|00004a00| 00 5a 62 00 64 5a 00 84 | 00 00 5a 63 00 64 5b 00 |.Zb.dZ..|..Zc.d[.|
|00004a10| 84 00 00 5a 64 00 64 5c | 00 84 00 00 5a 65 00 64 |...Zd.d\|....Ze.d|
|00004a20| 79 00 64 5d 00 84 01 00 | 5a 66 00 64 5e 00 84 00 |y.d]....|Zf.d^...|
|00004a30| 00 5a 67 00 64 5f 00 84 | 00 00 5a 68 00 64 79 00 |.Zg.d_..|..Zh.dy.|
|00004a40| 64 60 00 84 01 00 5a 69 | 00 64 61 00 84 00 00 5a |d`....Zi|.da....Z|
|00004a50| 6a 00 64 79 00 64 62 00 | 84 01 00 5a 6b 00 64 79 |j.dy.db.|...Zk.dy|
|00004a60| 00 64 63 00 84 01 00 5a | 6c 00 64 64 00 84 00 00 |.dc....Z|l.dd....|
|00004a70| 5a 6d 00 64 65 00 84 00 | 00 5a 6e 00 64 79 00 64 |Zm.de...|.Zn.dy.d|
|00004a80| 66 00 84 01 00 5a 6f 00 | 64 79 00 64 67 00 84 01 |f....Zo.|dy.dg...|
|00004a90| 00 5a 70 00 64 79 00 64 | 68 00 84 01 00 5a 71 00 |.Zp.dy.d|h....Zq.|
|00004aa0| 64 79 00 64 69 00 84 01 | 00 5a 72 00 64 79 00 64 |dy.di...|.Zr.dy.d|
|00004ab0| 6a 00 84 01 00 5a 73 00 | 64 79 00 64 6b 00 84 01 |j....Zs.|dy.dk...|
|00004ac0| 00 5a 74 00 64 79 00 64 | 6c 00 84 01 00 5a 75 00 |.Zt.dy.d|l....Zu.|
|00004ad0| 64 79 00 64 6d 00 84 01 | 00 5a 76 00 64 79 00 64 |dy.dm...|.Zv.dy.d|
|00004ae0| 6e 00 84 01 00 5a 77 00 | 64 79 00 64 6f 00 84 01 |n....Zw.|dy.do...|
|00004af0| 00 5a 78 00 64 70 00 84 | 00 00 5a 79 00 64 79 00 |.Zx.dp..|..Zy.dy.|
|00004b00| 64 71 00 84 01 00 5a 7a | 00 64 79 00 64 72 00 84 |dq....Zz|.dy.dr..|
|00004b10| 01 00 5a 7b 00 64 79 00 | 64 73 00 84 01 00 5a 7c |..Z{.dy.|ds....Z||
|00004b20| 00 64 74 00 84 00 00 5a | 7d 00 64 75 00 84 00 00 |.dt....Z|}.du....|
|00004b30| 5a 7e 00 64 76 00 84 00 | 00 5a 7f 00 64 79 00 64 |Z~.dv...|.Z..dy.d|
|00004b40| 77 00 84 01 00 5a 80 00 | 52 53 28 7a 00 00 00 73 |w....Z..|RS(z...s|
|00004b50| 2c 00 00 00 46 6c 6f 61 | 74 69 6e 67 20 70 6f 69 |,...Floa|ting poi|
|00004b60| 6e 74 20 63 6c 61 73 73 | 20 66 6f 72 20 64 65 63 |nt class| for dec|
|00004b70| 69 6d 61 6c 20 61 72 69 | 74 68 6d 65 74 69 63 2e |imal ari|thmetic.|
|00004b80| 74 04 00 00 00 5f 65 78 | 70 52 26 00 00 00 52 25 |t...._ex|pR&...R%|
|00004b90| 00 00 00 74 0b 00 00 00 | 5f 69 73 5f 73 70 65 63 |...t....|_is_spec|
|00004ba0| 69 61 6c 74 01 00 00 00 | 30 63 03 00 00 00 0b 00 |ialt....|0c......|
|00004bb0| 00 00 06 00 00 00 43 00 | 00 00 73 c4 04 00 00 74 |......C.|..s....t|
|00004bc0| 00 00 69 01 00 7c 00 00 | 83 01 00 7d 03 00 74 02 |..i..|..|...}..t.|
|00004bd0| 00 7c 01 00 74 03 00 83 | 02 00 6f 8c 01 01 74 04 |.|..t...|..o...t.|
|00004be0| 00 7c 01 00 69 05 00 83 | 00 00 83 01 00 7d 04 00 |.|..i...|.....}..|
|00004bf0| 7c 04 00 64 1a 00 6a 08 | 00 6f 2f 00 01 7c 02 00 ||..d..j.|.o/..|..|
|00004c00| 64 1a 00 6a 08 00 6f 0d | 00 01 74 07 00 83 00 00 |d..j..o.|..t.....|
|00004c10| 7d 02 00 6e 01 00 01 7c | 02 00 69 08 00 74 09 00 |}..n...||..i..t..|
|00004c20| 64 01 00 7c 01 00 16 83 | 02 00 53 01 7c 04 00 69 |d..|....|..S.|..i|
|00004c30| 0a 00 64 02 00 83 01 00 | 64 03 00 6a 02 00 6f 0d |..d.....|d..j..o.|
|00004c40| 00 01 64 04 00 7c 03 00 | 5f 0b 00 6e 0a 00 01 64 |..d..|..|_..n...d|
|00004c50| 05 00 7c 03 00 5f 0b 00 | 7c 04 00 69 0a 00 64 06 |..|.._..||..i..d.|
|00004c60| 00 83 01 00 7d 05 00 7c | 05 00 64 1a 00 6a 09 00 |....}..||..d..j..|
|00004c70| 6f 6b 00 01 7c 04 00 69 | 0a 00 64 07 00 83 01 00 |ok..|..i|..d.....|
|00004c80| 70 04 00 01 64 08 00 7d | 06 00 74 0c 00 7c 04 00 |p...d..}|..t..|..|
|00004c90| 69 0a 00 64 09 00 83 01 | 00 70 04 00 01 64 0a 00 |i..d....|.p...d..|
|00004ca0| 83 01 00 7d 07 00 74 0d | 00 74 0c 00 7c 05 00 7c |...}..t.|.t..|..||
|00004cb0| 06 00 17 83 01 00 83 01 | 00 7c 03 00 5f 0e 00 7c |........|.|.._..||
|00004cc0| 07 00 74 0f 00 7c 06 00 | 83 01 00 18 7c 03 00 5f |..t..|..|....|.._|
|00004cd0| 10 00 74 11 00 7c 03 00 | 5f 12 00 6e 87 00 01 7c |..t..|..|_..n...||
|00004ce0| 04 00 69 0a 00 64 0b 00 | 83 01 00 7d 08 00 7c 08 |..i..d..|...}..|.|
|00004cf0| 00 64 1a 00 6a 09 00 6f | 4f 00 01 74 0d 00 74 0c |.d..j..o|O..t..t.|
|00004d00| 00 7c 08 00 70 04 00 01 | 64 0a 00 83 01 00 83 01 |.|..p...|d.......|
|00004d10| 00 69 13 00 64 0a 00 83 | 01 00 7c 03 00 5f 0e 00 |.i..d...|..|.._..|
|00004d20| 7c 04 00 69 0a 00 64 0c | 00 83 01 00 6f 0d 00 01 ||..i..d.|....o...|
|00004d30| 64 0d 00 7c 03 00 5f 10 | 00 71 9d 01 01 64 0e 00 |d..|.._.|.q...d..|
|00004d40| 7c 03 00 5f 10 00 6e 13 | 00 01 64 0a 00 7c 03 00 ||.._..n.|..d..|..|
|00004d50| 5f 0e 00 64 0f 00 7c 03 | 00 5f 10 00 74 14 00 7c |_..d..|.|._..t..||
|00004d60| 03 00 5f 12 00 7c 03 00 | 53 01 74 02 00 7c 01 00 |.._..|..|S.t..|..|
|00004d70| 74 0c 00 74 15 00 66 02 | 00 83 02 00 6f 4f 00 01 |t..t..f.|....oO..|
|00004d80| 7c 01 00 64 05 00 6a 05 | 00 6f 0d 00 01 64 05 00 ||..d..j.|.o...d..|
|00004d90| 7c 03 00 5f 0b 00 6e 0a | 00 01 64 04 00 7c 03 00 ||.._..n.|..d..|..|
|00004da0| 5f 0b 00 64 05 00 7c 03 | 00 5f 10 00 74 0d 00 74 |_..d..|.|._..t..t|
|00004db0| 16 00 7c 01 00 83 01 00 | 83 01 00 7c 03 00 5f 0e |..|.....|...|.._.|
|00004dc0| 00 74 11 00 7c 03 00 5f | 12 00 7c 03 00 53 01 74 |.t..|.._|..|..S.t|
|00004dd0| 02 00 7c 01 00 74 17 00 | 83 02 00 6f 35 00 01 7c |..|..t..|...o5..||
|00004de0| 01 00 69 10 00 7c 03 00 | 5f 10 00 7c 01 00 69 0b |..i..|..|_..|..i.|
|00004df0| 00 7c 03 00 5f 0b 00 7c | 01 00 69 0e 00 7c 03 00 |.|.._..||..i..|..|
|00004e00| 5f 0e 00 7c 01 00 69 12 | 00 7c 03 00 5f 12 00 7c |_..|..i.|.|.._..||
|00004e10| 03 00 53 01 74 02 00 7c | 01 00 74 18 00 83 02 00 |..S.t..||..t.....|
|00004e20| 6f 3e 00 01 7c 01 00 69 | 19 00 7c 03 00 5f 0b 00 |o>..|..i|..|.._..|
|00004e30| 74 0d 00 7c 01 00 69 0c | 00 83 01 00 7c 03 00 5f |t..|..i.|....|.._|
|00004e40| 0e 00 74 0c 00 7c 01 00 | 69 1a 00 83 01 00 7c 03 |..t..|..|i.....|.|
|00004e50| 00 5f 10 00 74 11 00 7c | 03 00 5f 12 00 7c 03 00 |._..t..||.._..|..|
|00004e60| 53 01 74 02 00 7c 01 00 | 74 1b 00 74 1c 00 66 02 |S.t..|..|t..t..f.|
|00004e70| 00 83 02 00 6f d3 01 01 | 74 0f 00 7c 01 00 83 01 |....o...|t..|....|
|00004e80| 00 64 10 00 6a 03 00 6f | 10 00 01 74 1d 00 64 11 |.d..j..o|...t..d.|
|00004e90| 00 83 01 00 82 01 00 6e | 01 00 01 74 02 00 7c 01 |.......n|...t..|.|
|00004ea0| 00 64 05 00 19 74 0c 00 | 74 15 00 66 02 00 83 02 |.d...t..|t..f....|
|00004eb0| 00 6f 0e 00 01 7c 01 00 | 64 05 00 19 64 1b 00 6a |.o...|..|d...d..j|
|00004ec0| 06 00 70 10 00 01 74 1d | 00 64 12 00 83 01 00 82 |..p...t.|.d......|
|00004ed0| 01 00 6e 01 00 01 7c 01 | 00 64 05 00 19 7c 03 00 |..n...|.|.d...|..|
|00004ee0| 5f 0b 00 7c 01 00 64 13 | 00 19 64 0f 00 6a 02 00 |_..|..d.|..d..j..|
|00004ef0| 6f 23 00 01 64 0a 00 7c | 03 00 5f 0e 00 7c 01 00 |o#..d..||.._..|..|
|00004f00| 64 13 00 19 7c 03 00 5f | 10 00 74 14 00 7c 03 00 |d...|.._|..t..|..|
|00004f10| 5f 12 00 6e 30 01 01 67 | 00 00 7d 09 00 78 7b 00 |_..n0..g|..}..x{.|
|00004f20| 7c 01 00 64 04 00 19 44 | 5d 6f 00 7d 0a 00 74 02 ||..d...D|]o.}..t.|
|00004f30| 00 7c 0a 00 74 0c 00 74 | 15 00 66 02 00 83 02 00 |.|..t..t|..f.....|
|00004f40| 6f 47 00 01 64 05 00 7c | 0a 00 04 03 6a 01 00 6f |oG..d..||....j..o|
|00004f50| 0a 00 01 64 14 00 6a 01 | 00 6e 02 00 02 01 6f 29 |...d..j.|.n....o)|
|00004f60| 00 01 7c 09 00 70 0d 00 | 01 7c 0a 00 64 05 00 6a |..|..p..|.|..d..j|
|00004f70| 03 00 6f 11 00 01 7c 09 | 00 69 1e 00 7c 0a 00 83 |..o...|.|.i..|...|
|00004f80| 01 00 01 71 d8 03 01 71 | 69 03 01 74 1d 00 64 15 |...q...q|i..t..d.|
|00004f90| 00 83 01 00 82 01 00 71 | 69 03 57 7c 01 00 64 13 |.......q|i.W|..d.|
|00004fa0| 00 19 64 1c 00 6a 06 00 | 6f 35 00 01 64 08 00 69 |..d..j..|o5..d..i|
|00004fb0| 1f 00 74 20 00 74 0d 00 | 7c 09 00 83 02 00 83 01 |..t .t..||.......|
|00004fc0| 00 7c 03 00 5f 0e 00 7c | 01 00 64 13 00 19 7c 03 |.|.._..||..d...|.|
|00004fd0| 00 5f 10 00 74 14 00 7c | 03 00 5f 12 00 6e 66 00 |._..t..||.._..nf.|
|00004fe0| 01 74 02 00 7c 01 00 64 | 13 00 19 74 0c 00 74 15 |.t..|..d|...t..t.|
|00004ff0| 00 66 02 00 83 02 00 6f | 3f 00 01 64 08 00 69 1f |.f.....o|?..d..i.|
|00005000| 00 74 20 00 74 0d 00 7c | 09 00 70 07 00 01 64 05 |.t .t..||..p...d.|
|00005010| 00 67 01 00 83 02 00 83 | 01 00 7c 03 00 5f 0e 00 |.g......|..|.._..|
|00005020| 7c 01 00 64 13 00 19 7c | 03 00 5f 10 00 74 11 00 ||..d...||.._..t..|
|00005030| 7c 03 00 5f 12 00 6e 0d | 00 01 74 1d 00 64 16 00 ||.._..n.|..t..d..|
|00005040| 83 01 00 82 01 00 7c 03 | 00 53 01 74 02 00 7c 01 |......|.|.S.t..|.|
|00005050| 00 74 21 00 83 02 00 6f | 14 00 01 74 22 00 64 17 |.t!....o|...t".d.|
|00005060| 00 64 18 00 17 83 01 00 | 82 01 00 6e 01 00 01 74 |.d......|...n...t|
|00005070| 22 00 64 19 00 7c 01 00 | 16 83 01 00 82 01 00 64 |".d..|..|.......d|
|00005080| 1a 00 53 28 1d 00 00 00 | 73 f2 01 00 00 43 72 65 |..S(....|s....Cre|
|00005090| 61 74 65 20 61 20 64 65 | 63 69 6d 61 6c 20 70 6f |ate a de|cimal po|
|000050a0| 69 6e 74 20 69 6e 73 74 | 61 6e 63 65 2e 0a 0a 20 |int inst|ance... |
|000050b0| 20 20 20 20 20 20 20 3e | 3e 3e 20 44 65 63 69 6d | >|>> Decim|
|000050c0| 61 6c 28 27 33 2e 31 34 | 27 29 20 20 20 20 20 20 |al('3.14|') |
|000050d0| 20 20 20 20 20 20 20 20 | 23 20 73 74 72 69 6e 67 | |# string|
|000050e0| 20 69 6e 70 75 74 0a 20 | 20 20 20 20 20 20 20 44 | input. | D|
|000050f0| 65 63 69 6d 61 6c 28 27 | 33 2e 31 34 27 29 0a 20 |ecimal('|3.14'). |
|00005100| 20 20 20 20 20 20 20 3e | 3e 3e 20 44 65 63 69 6d | >|>> Decim|
|00005110| 61 6c 28 28 30 2c 20 28 | 33 2c 20 31 2c 20 34 29 |al((0, (|3, 1, 4)|
|00005120| 2c 20 2d 32 29 29 20 20 | 23 20 74 75 70 6c 65 20 |, -2)) |# tuple |
|00005130| 28 73 69 67 6e 2c 20 64 | 69 67 69 74 5f 74 75 70 |(sign, d|igit_tup|
|00005140| 6c 65 2c 20 65 78 70 6f | 6e 65 6e 74 29 0a 20 20 |le, expo|nent). |
|00005150| 20 20 20 20 20 20 44 65 | 63 69 6d 61 6c 28 27 33 | De|cimal('3|
|00005160| 2e 31 34 27 29 0a 20 20 | 20 20 20 20 20 20 3e 3e |.14'). | >>|
|00005170| 3e 20 44 65 63 69 6d 61 | 6c 28 33 31 34 29 20 20 |> Decima|l(314) |
|00005180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 23 | | #|
|00005190| 20 69 6e 74 20 6f 72 20 | 6c 6f 6e 67 0a 20 20 20 | int or |long. |
|000051a0| 20 20 20 20 20 44 65 63 | 69 6d 61 6c 28 27 33 31 | Dec|imal('31|
|000051b0| 34 27 29 0a 20 20 20 20 | 20 20 20 20 3e 3e 3e 20 |4'). | >>> |
|000051c0| 44 65 63 69 6d 61 6c 28 | 44 65 63 69 6d 61 6c 28 |Decimal(|Decimal(|
|000051d0| 33 31 34 29 29 20 20 20 | 20 20 20 20 20 23 20 61 |314)) | # a|
|000051e0| 6e 6f 74 68 65 72 20 64 | 65 63 69 6d 61 6c 20 69 |nother d|ecimal i|
|000051f0| 6e 73 74 61 6e 63 65 0a | 20 20 20 20 20 20 20 20 |nstance.| |
|00005200| 44 65 63 69 6d 61 6c 28 | 27 33 31 34 27 29 0a 20 |Decimal(|'314'). |
|00005210| 20 20 20 20 20 20 20 3e | 3e 3e 20 44 65 63 69 6d | >|>> Decim|
|00005220| 61 6c 28 27 20 20 33 2e | 31 34 20 20 5c 6e 27 29 |al(' 3.|14 \n')|
|00005230| 20 20 20 20 20 20 20 20 | 23 20 6c 65 61 64 69 6e | |# leadin|
|00005240| 67 20 61 6e 64 20 74 72 | 61 69 6c 69 6e 67 20 77 |g and tr|ailing w|
|00005250| 68 69 74 65 73 70 61 63 | 65 20 6f 6b 61 79 0a 20 |hitespac|e okay. |
|00005260| 20 20 20 20 20 20 20 44 | 65 63 69 6d 61 6c 28 27 | D|ecimal('|
|00005270| 33 2e 31 34 27 29 0a 20 | 20 20 20 20 20 20 20 73 |3.14'). | s|
|00005280| 1f 00 00 00 49 6e 76 61 | 6c 69 64 20 6c 69 74 65 |....Inva|lid lite|
|00005290| 72 61 6c 20 66 6f 72 20 | 44 65 63 69 6d 61 6c 3a |ral for |Decimal:|
|000052a0| 20 25 72 52 2d 00 00 00 | 74 01 00 00 00 2d 69 01 | %rR-...|t....-i.|
|000052b0| 00 00 00 69 00 00 00 00 | 74 03 00 00 00 69 6e 74 |...i....|t....int|
|000052c0| 74 04 00 00 00 66 72 61 | 63 74 00 00 00 00 74 03 |t....fra|ct....t.|
|000052d0| 00 00 00 65 78 70 52 45 | 00 00 00 74 04 00 00 00 |...expRE|...t....|
|000052e0| 64 69 61 67 74 06 00 00 | 00 73 69 67 6e 61 6c 74 |diagt...|.signalt|
|000052f0| 01 00 00 00 4e 52 23 00 | 00 00 74 01 00 00 00 46 |....NR#.|..t....F|
|00005300| 69 03 00 00 00 73 74 00 | 00 00 49 6e 76 61 6c 69 |i....st.|..Invali|
|00005310| 64 20 74 75 70 6c 65 20 | 73 69 7a 65 20 69 6e 20 |d tuple |size in |
|00005320| 63 72 65 61 74 69 6f 6e | 20 6f 66 20 44 65 63 69 |creation| of Deci|
|00005330| 6d 61 6c 20 66 72 6f 6d | 20 6c 69 73 74 20 6f 72 |mal from| list or|
|00005340| 20 74 75 70 6c 65 2e 20 | 20 54 68 65 20 6c 69 73 | tuple. | The lis|
|00005350| 74 20 6f 72 20 74 75 70 | 6c 65 20 73 68 6f 75 6c |t or tup|le shoul|
|00005360| 64 20 68 61 76 65 20 65 | 78 61 63 74 6c 79 20 74 |d have e|xactly t|
|00005370| 68 72 65 65 20 65 6c 65 | 6d 65 6e 74 73 2e 73 7c |hree ele|ments.s||
|00005380| 00 00 00 49 6e 76 61 6c | 69 64 20 73 69 67 6e 2e |...Inval|id sign.|
|00005390| 20 20 54 68 65 20 66 69 | 72 73 74 20 76 61 6c 75 | The fi|rst valu|
|000053a0| 65 20 69 6e 20 74 68 65 | 20 74 75 70 6c 65 20 73 |e in the| tuple s|
|000053b0| 68 6f 75 6c 64 20 62 65 | 20 61 6e 20 69 6e 74 65 |hould be| an inte|
|000053c0| 67 65 72 3b 20 65 69 74 | 68 65 72 20 30 20 66 6f |ger; eit|her 0 fo|
|000053d0| 72 20 61 20 70 6f 73 69 | 74 69 76 65 20 6e 75 6d |r a posi|tive num|
|000053e0| 62 65 72 20 6f 72 20 31 | 20 66 6f 72 20 61 20 6e |ber or 1| for a n|
|000053f0| 65 67 61 74 69 76 65 20 | 6e 75 6d 62 65 72 2e 69 |egative |number.i|
|00005400| 02 00 00 00 69 09 00 00 | 00 73 54 00 00 00 54 68 |....i...|.sT...Th|
|00005410| 65 20 73 65 63 6f 6e 64 | 20 76 61 6c 75 65 20 69 |e second| value i|
|00005420| 6e 20 74 68 65 20 74 75 | 70 6c 65 20 6d 75 73 74 |n the tu|ple must|
|00005430| 20 62 65 20 63 6f 6d 70 | 6f 73 65 64 20 6f 66 20 | be comp|osed of |
|00005440| 69 6e 74 65 67 65 72 73 | 20 69 6e 20 74 68 65 20 |integers| in the |
|00005450| 72 61 6e 67 65 20 30 20 | 74 68 72 6f 75 67 68 20 |range 0 |through |
|00005460| 39 2e 73 55 00 00 00 54 | 68 65 20 74 68 69 72 64 |9.sU...T|he third|
|00005470| 20 76 61 6c 75 65 20 69 | 6e 20 74 68 65 20 74 75 | value i|n the tu|
|00005480| 70 6c 65 20 6d 75 73 74 | 20 62 65 20 61 6e 20 69 |ple must| be an i|
|00005490| 6e 74 65 67 65 72 2c 20 | 6f 72 20 6f 6e 65 20 6f |nteger, |or one o|
|000054a0| 66 20 74 68 65 20 73 74 | 72 69 6e 67 73 20 27 46 |f the st|rings 'F|
|000054b0| 27 2c 20 27 6e 27 2c 20 | 27 4e 27 2e 73 22 00 00 |', 'n', |'N'.s"..|
|000054c0| 00 43 61 6e 6e 6f 74 20 | 63 6f 6e 76 65 72 74 20 |.Cannot |convert |
|000054d0| 66 6c 6f 61 74 20 74 6f | 20 44 65 63 69 6d 61 6c |float to| Decimal|
|000054e0| 2e 20 20 73 23 00 00 00 | 46 69 72 73 74 20 63 6f |. s#...|First co|
|000054f0| 6e 76 65 72 74 20 74 68 | 65 20 66 6c 6f 61 74 20 |nvert th|e float |
|00005500| 74 6f 20 61 20 73 74 72 | 69 6e 67 73 1c 00 00 00 |to a str|ings....|
|00005510| 43 61 6e 6e 6f 74 20 63 | 6f 6e 76 65 72 74 20 25 |Cannot c|onvert %|
|00005520| 72 20 74 6f 20 44 65 63 | 69 6d 61 6c 4e 28 02 00 |r to Dec|imalN(..|
|00005530| 00 00 69 00 00 00 00 69 | 01 00 00 00 28 02 00 00 |..i....i|....(...|
|00005540| 00 52 23 00 00 00 52 4d | 00 00 00 28 23 00 00 00 |.R#...RM|...(#...|
|00005550| 74 06 00 00 00 6f 62 6a | 65 63 74 74 07 00 00 00 |t....obj|ectt....|
|00005560| 5f 5f 6e 65 77 5f 5f 74 | 0a 00 00 00 69 73 69 6e |__new__t|....isin|
|00005570| 73 74 61 6e 63 65 74 0a | 00 00 00 62 61 73 65 73 |stancet.|...bases|
|00005580| 74 72 69 6e 67 74 07 00 | 00 00 5f 70 61 72 73 65 |tringt..|.._parse|
|00005590| 72 74 05 00 00 00 73 74 | 72 69 70 52 40 00 00 00 |rt....st|ripR@...|
|000055a0| 52 17 00 00 00 74 0c 00 | 00 00 5f 72 61 69 73 65 |R....t..|.._raise|
|000055b0| 5f 65 72 72 6f 72 52 2b | 00 00 00 74 05 00 00 00 |_errorR+|...t....|
|000055c0| 67 72 6f 75 70 52 25 00 | 00 00 52 47 00 00 00 74 |groupR%.|..RG...t|
|000055d0| 03 00 00 00 73 74 72 52 | 26 00 00 00 74 03 00 00 |....strR|&...t...|
|000055e0| 00 6c 65 6e 52 43 00 00 | 00 74 05 00 00 00 46 61 |.lenRC..|.t....Fa|
|000055f0| 6c 73 65 52 44 00 00 00 | 74 06 00 00 00 6c 73 74 |lseRD...|t....lst|
|00005600| 72 69 70 52 27 00 00 00 | 74 04 00 00 00 6c 6f 6e |ripR'...|t....lon|
|00005610| 67 74 03 00 00 00 61 62 | 73 52 00 00 00 00 74 08 |gt....ab|sR....t.|
|00005620| 00 00 00 5f 57 6f 72 6b | 52 65 70 52 2d 00 00 00 |..._Work|RepR-...|
|00005630| 52 4a 00 00 00 74 04 00 | 00 00 6c 69 73 74 74 05 |RJ...t..|..listt.|
|00005640| 00 00 00 74 75 70 6c 65 | 74 0a 00 00 00 56 61 6c |...tuple|t....Val|
|00005650| 75 65 45 72 72 6f 72 74 | 06 00 00 00 61 70 70 65 |ueErrort|....appe|
|00005660| 6e 64 74 04 00 00 00 6a | 6f 69 6e 74 03 00 00 00 |ndt....j|oint....|
|00005670| 6d 61 70 74 05 00 00 00 | 66 6c 6f 61 74 74 09 00 |mapt....|floatt..|
|00005680| 00 00 54 79 70 65 45 72 | 72 6f 72 28 0b 00 00 00 |..TypeEr|ror(....|
|00005690| 74 03 00 00 00 63 6c 73 | 74 05 00 00 00 76 61 6c |t....cls|t....val|
|000056a0| 75 65 52 1e 00 00 00 52 | 1d 00 00 00 74 01 00 00 |ueR....R|....t...|
|000056b0| 00 6d 74 07 00 00 00 69 | 6e 74 70 61 72 74 74 08 |.mt....i|ntpartt.|
|000056c0| 00 00 00 66 72 61 63 70 | 61 72 74 52 4a 00 00 00 |...fracp|artRJ...|
|000056d0| 52 4b 00 00 00 74 06 00 | 00 00 64 69 67 69 74 73 |RK...t..|..digits|
|000056e0| 74 05 00 00 00 64 69 67 | 69 74 28 00 00 00 00 28 |t....dig|it(....(|
|000056f0| 00 00 00 00 73 1d 00 00 | 00 2f 75 73 72 2f 6c 69 |....s...|./usr/li|
|00005700| 62 2f 70 79 74 68 6f 6e | 32 2e 36 2f 64 65 63 69 |b/python|2.6/deci|
|00005710| 6d 61 6c 2e 70 79 52 50 | 00 00 00 00 02 00 00 73 |mal.pyRP|.......s|
|00005720| 9e 00 00 00 00 17 0f 04 | 10 01 12 01 0d 01 0d 01 |........|........|
|00005730| 0d 01 09 01 0c 02 16 01 | 0d 02 09 01 0f 01 0d 02 |........|........|
|00005740| 16 01 1c 01 19 01 13 01 | 0d 02 0f 01 0d 02 25 01 |........|......%.|
|00005750| 10 01 0d 02 0d 03 09 01 | 09 01 09 01 05 03 16 01 |........|........|
|00005760| 0d 01 0d 02 09 01 09 01 | 15 01 09 01 05 03 10 01 |........|........|
|00005770| 0c 01 0c 01 0c 01 0c 01 | 05 03 10 01 0c 01 12 01 |........|........|
|00005780| 12 01 09 01 05 03 16 01 | 13 01 10 04 2b 01 10 03 |........|....+...|
|00005790| 0d 01 11 02 09 01 0d 01 | 0d 03 06 01 0b 00 06 01 |........|........|
|000057a0| 34 02 14 01 15 02 10 03 | 11 02 1b 01 0d 01 0d 01 |4.......|........|
|000057b0| 1a 02 25 01 0d 01 0d 02 | 0c 03 05 02 10 01 06 01 |..%.....|........|
|000057c0| 0e 02 63 01 00 00 00 02 | 00 00 00 02 00 00 00 43 |..c.....|.......C|
|000057d0| 00 00 00 73 3f 00 00 00 | 7c 00 00 69 00 00 6f 31 |...s?...||..i..o1|
|000057e0| 00 01 7c 00 00 69 01 00 | 7d 01 00 7c 01 00 64 01 |..|..i..|}..|..d.|
|000057f0| 00 6a 02 00 6f 05 00 01 | 64 02 00 53 01 7c 01 00 |.j..o...|d..S.|..|
|00005800| 64 03 00 6a 02 00 6f 05 | 00 01 64 04 00 53 01 6e |d..j..o.|..d..S.n|
|00005810| 01 00 01 64 05 00 53 28 | 06 00 00 00 73 72 00 00 |...d..S(|....sr..|
|00005820| 00 52 65 74 75 72 6e 73 | 20 77 68 65 74 68 65 72 |.Returns| whether|
|00005830| 20 74 68 65 20 6e 75 6d | 62 65 72 20 69 73 20 6e | the num|ber is n|
|00005840| 6f 74 20 61 63 74 75 61 | 6c 6c 79 20 6f 6e 65 2e |ot actua|lly one.|
|00005850| 0a 0a 20 20 20 20 20 20 | 20 20 30 20 69 66 20 61 |.. | 0 if a|
|00005860| 20 6e 75 6d 62 65 72 0a | 20 20 20 20 20 20 20 20 | number.| |
|00005870| 31 20 69 66 20 4e 61 4e | 0a 20 20 20 20 20 20 20 |1 if NaN|. |
|00005880| 20 32 20 69 66 20 73 4e | 61 4e 0a 20 20 20 20 20 | 2 if sN|aN. |
|00005890| 20 20 20 52 23 00 00 00 | 69 01 00 00 00 52 4d 00 | R#...|i....RM.|
|000058a0| 00 00 69 02 00 00 00 69 | 00 00 00 00 28 02 00 00 |..i....i|....(...|
|000058b0| 00 52 44 00 00 00 52 43 | 00 00 00 28 02 00 00 00 |.RD...RC|...(....|
|000058c0| 52 1d 00 00 00 52 4a 00 | 00 00 28 00 00 00 00 28 |R....RJ.|..(....(|
|000058d0| 00 00 00 00 73 1d 00 00 | 00 2f 75 73 72 2f 6c 69 |....s...|./usr/li|
|000058e0| 62 2f 70 79 74 68 6f 6e | 32 2e 36 2f 64 65 63 69 |b/python|2.6/deci|
|000058f0| 6d 61 6c 2e 70 79 74 06 | 00 00 00 5f 69 73 6e 61 |mal.pyt.|..._isna|
|00005900| 6e 8d 02 00 00 73 0e 00 | 00 00 00 07 0a 01 09 01 |n....s..|........|
|00005910| 0d 01 05 01 0d 01 09 01 | 63 01 00 00 00 01 00 00 |........|c.......|
|00005920| 00 02 00 00 00 43 00 00 | 00 73 28 00 00 00 7c 00 |.....C..|.s(...|.|
|00005930| 00 69 00 00 64 01 00 6a | 02 00 6f 14 00 01 7c 00 |.i..d..j|..o...|.|
|00005940| 00 69 01 00 6f 05 00 01 | 64 02 00 53 01 64 03 00 |.i..o...|d..S.d..|
|00005950| 53 01 64 04 00 53 28 05 | 00 00 00 73 79 00 00 00 |S.d..S(.|...sy...|
|00005960| 52 65 74 75 72 6e 73 20 | 77 68 65 74 68 65 72 20 |Returns |whether |
|00005970| 74 68 65 20 6e 75 6d 62 | 65 72 20 69 73 20 69 6e |the numb|er is in|
|00005980| 66 69 6e 69 74 65 0a 0a | 20 20 20 20 20 20 20 20 |finite..| |
|00005990| 30 20 69 66 20 66 69 6e | 69 74 65 20 6f 72 20 6e |0 if fin|ite or n|
|000059a0| 6f 74 20 61 20 6e 75 6d | 62 65 72 0a 20 20 20 20 |ot a num|ber. |
|000059b0| 20 20 20 20 31 20 69 66 | 20 2b 49 4e 46 0a 20 20 | 1 if| +INF. |
|000059c0| 20 20 20 20 20 20 2d 31 | 20 69 66 20 2d 49 4e 46 | -1| if -INF|
|000059d0| 0a 20 20 20 20 20 20 20 | 20 52 4e 00 00 00 69 ff |. | RN...i.|
|000059e0| ff ff ff 69 01 00 00 00 | 69 00 00 00 00 28 02 00 |...i....|i....(..|
|000059f0| 00 00 52 43 00 00 00 52 | 25 00 00 00 28 01 00 00 |..RC...R|%...(...|
|00005a00| 00 52 1d 00 00 00 28 00 | 00 00 00 28 00 00 00 00 |.R....(.|...(....|
|00005a10| 73 1d 00 00 00 2f 75 73 | 72 2f 6c 69 62 2f 70 79 |s..../us|r/lib/py|
|00005a20| 74 68 6f 6e 32 2e 36 2f | 64 65 63 69 6d 61 6c 2e |thon2.6/|decimal.|
|00005a30| 70 79 74 0b 00 00 00 5f | 69 73 69 6e 66 69 6e 69 |pyt...._|isinfini|
|00005a40| 74 79 9c 02 00 00 73 0a | 00 00 00 00 07 10 01 0a |ty....s.|........|
|00005a50| 01 05 01 05 01 63 03 00 | 00 00 05 00 00 00 04 00 |.....c..|........|
|00005a60| 00 00 43 00 00 00 73 c0 | 00 00 00 7c 00 00 69 00 |..C...s.|...|..i.|
|00005a70| 00 83 00 00 7d 03 00 7c | 01 00 64 04 00 6a 08 00 |....}..||..d..j..|
|00005a80| 6f 0a 00 01 74 02 00 7d | 04 00 6e 0d 00 01 7c 01 |o...t..}|..n...|.|
|00005a90| 00 69 00 00 83 00 00 7d | 04 00 7c 03 00 70 07 00 |.i.....}|..|..p..|
|00005aa0| 01 7c 04 00 6f 7f 00 01 | 7c 02 00 64 04 00 6a 08 |.|..o...||..d..j.|
|00005ab0| 00 6f 0d 00 01 74 03 00 | 83 00 00 7d 02 00 6e 01 |.o...t..|...}..n.|
|00005ac0| 00 01 7c 03 00 64 01 00 | 6a 02 00 6f 14 00 01 7c |..|..d..|j..o...||
|00005ad0| 02 00 69 04 00 74 05 00 | 64 02 00 7c 00 00 83 03 |..i..t..|d..|....|
|00005ae0| 00 53 01 7c 04 00 64 01 | 00 6a 02 00 6f 14 00 01 |.S.|..d.|.j..o...|
|00005af0| 7c 02 00 69 04 00 74 05 | 00 64 02 00 7c 01 00 83 ||..i..t.|.d..|...|
|00005b00| 03 00 53 01 7c 03 00 6f | 0e 00 01 7c 00 00 69 06 |..S.|..o|...|..i.|
|00005b10| 00 7c 02 00 83 01 00 53 | 01 7c 01 00 69 06 00 7c |.|.....S|.|..i..||
|00005b20| 02 00 83 01 00 53 01 64 | 03 00 53 28 05 00 00 00 |.....S.d|..S(....|
|00005b30| 73 bd 00 00 00 52 65 74 | 75 72 6e 73 20 77 68 65 |s....Ret|urns whe|
|00005b40| 74 68 65 72 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |ther the| number |
|00005b50| 69 73 20 6e 6f 74 20 61 | 63 74 75 61 6c 6c 79 20 |is not a|ctually |
|00005b60| 6f 6e 65 2e 0a 0a 20 20 | 20 20 20 20 20 20 69 66 |one... | if|
|00005b70| 20 73 65 6c 66 2c 20 6f | 74 68 65 72 20 61 72 65 | self, o|ther are|
|00005b80| 20 73 4e 61 4e 2c 20 73 | 69 67 6e 61 6c 0a 20 20 | sNaN, s|ignal. |
|00005b90| 20 20 20 20 20 20 69 66 | 20 73 65 6c 66 2c 20 6f | if| self, o|
|00005ba0| 74 68 65 72 20 61 72 65 | 20 4e 61 4e 20 72 65 74 |ther are| NaN ret|
|00005bb0| 75 72 6e 20 6e 61 6e 0a | 20 20 20 20 20 20 20 20 |urn nan.| |
|00005bc0| 72 65 74 75 72 6e 20 30 | 0a 0a 20 20 20 20 20 20 |return 0|.. |
|00005bd0| 20 20 44 6f 6e 65 20 62 | 65 66 6f 72 65 20 6f 70 | Done b|efore op|
|00005be0| 65 72 61 74 69 6f 6e 73 | 2e 0a 20 20 20 20 20 20 |erations|.. |
|00005bf0| 20 20 69 02 00 00 00 74 | 04 00 00 00 73 4e 61 4e | i....t|....sNaN|
|00005c00| 69 00 00 00 00 4e 28 07 | 00 00 00 52 6d 00 00 00 |i....N(.|...Rm...|
|00005c10| 52 40 00 00 00 52 59 00 | 00 00 52 17 00 00 00 52 |R@...RY.|..R....R|
|00005c20| 55 00 00 00 52 07 00 00 | 00 52 28 00 00 00 28 05 |U...R...|.R(...(.|
|00005c30| 00 00 00 52 1d 00 00 00 | 74 05 00 00 00 6f 74 68 |...R....|t....oth|
|00005c40| 65 72 52 1e 00 00 00 74 | 0b 00 00 00 73 65 6c 66 |erR....t|....self|
|00005c50| 5f 69 73 5f 6e 61 6e 74 | 0c 00 00 00 6f 74 68 65 |_is_nant|....othe|
|00005c60| 72 5f 69 73 5f 6e 61 6e | 28 00 00 00 00 28 00 00 |r_is_nan|(....(..|
|00005c70| 00 00 73 1d 00 00 00 2f | 75 73 72 2f 6c 69 62 2f |..s..../|usr/lib/|
|00005c80| 70 79 74 68 6f 6e 32 2e | 36 2f 64 65 63 69 6d 61 |python2.|6/decima|
|00005c90| 6c 2e 70 79 74 0b 00 00 | 00 5f 63 68 65 63 6b 5f |l.pyt...|._check_|
|00005ca0| 6e 61 6e 73 a9 02 00 00 | 73 22 00 00 00 00 0a 0c |nans....|s"......|
|00005cb0| 01 0d 01 0a 02 0c 02 0e | 01 0d 01 0d 02 0d 01 0c |........|........|
|00005cc0| 01 08 01 0d 01 0c 01 08 | 01 07 01 0e 02 0e 01 63 |........|.......c|
|00005cd0| 03 00 00 00 03 00 00 00 | 04 00 00 00 43 00 00 00 |........|....C...|
|00005ce0| 73 ba 00 00 00 7c 02 00 | 64 04 00 6a 08 00 6f 0d |s....|..|d..j..o.|
|00005cf0| 00 01 74 01 00 83 00 00 | 7d 02 00 6e 01 00 01 7c |..t.....|}..n...||
|00005d00| 00 00 69 02 00 70 0a 00 | 01 7c 01 00 69 02 00 6f |..i..p..|.|..i..o|
|00005d10| 88 00 01 7c 00 00 69 03 | 00 83 00 00 6f 14 00 01 |...|..i.|....o...|
|00005d20| 7c 02 00 69 04 00 74 05 | 00 64 01 00 7c 00 00 83 ||..i..t.|.d..|...|
|00005d30| 03 00 53 01 7c 01 00 69 | 03 00 83 00 00 6f 14 00 |..S.|..i|.....o..|
|00005d40| 01 7c 02 00 69 04 00 74 | 05 00 64 01 00 7c 01 00 |.|..i..t|..d..|..|
|00005d50| 83 03 00 53 01 7c 00 00 | 69 06 00 83 00 00 6f 14 |...S.|..|i.....o.|
|00005d60| 00 01 7c 02 00 69 04 00 | 74 05 00 64 02 00 7c 00 |..|..i..|t..d..|.|
|00005d70| 00 83 03 00 53 01 7c 01 | 00 69 06 00 83 00 00 6f |....S.|.|.i.....o|
|00005d80| 14 00 01 7c 02 00 69 04 | 00 74 05 00 64 02 00 7c |...|..i.|.t..d..||
|00005d90| 01 00 83 03 00 53 01 6e | 01 00 01 64 03 00 53 28 |.....S.n|...d..S(|
|00005da0| 05 00 00 00 73 43 01 00 | 00 56 65 72 73 69 6f 6e |....sC..|.Version|
|00005db0| 20 6f 66 20 5f 63 68 65 | 63 6b 5f 6e 61 6e 73 20 | of _che|ck_nans |
|00005dc0| 75 73 65 64 20 66 6f 72 | 20 74 68 65 20 73 69 67 |used for| the sig|
|00005dd0| 6e 61 6c 69 6e 67 20 63 | 6f 6d 70 61 72 69 73 6f |naling c|ompariso|
|00005de0| 6e 73 0a 20 20 20 20 20 | 20 20 20 63 6f 6d 70 61 |ns. | compa|
|00005df0| 72 65 5f 73 69 67 6e 61 | 6c 2c 20 5f 5f 6c 65 5f |re_signa|l, __le_|
|00005e00| 5f 2c 20 5f 5f 6c 74 5f | 5f 2c 20 5f 5f 67 65 5f |_, __lt_|_, __ge_|
|00005e10| 5f 2c 20 5f 5f 67 74 5f | 5f 2e 0a 0a 20 20 20 20 |_, __gt_|_... |
|00005e20| 20 20 20 20 53 69 67 6e | 61 6c 20 49 6e 76 61 6c | Sign|al Inval|
|00005e30| 69 64 4f 70 65 72 61 74 | 69 6f 6e 20 69 66 20 65 |idOperat|ion if e|
|00005e40| 69 74 68 65 72 20 73 65 | 6c 66 20 6f 72 20 6f 74 |ither se|lf or ot|
|00005e50| 68 65 72 20 69 73 20 61 | 20 28 71 75 69 65 74 0a |her is a| (quiet.|
|00005e60| 20 20 20 20 20 20 20 20 | 6f 72 20 73 69 67 6e 61 | |or signa|
|00005e70| 6c 69 6e 67 29 20 4e 61 | 4e 2e 20 20 53 69 67 6e |ling) Na|N. Sign|
|00005e80| 61 6c 69 6e 67 20 4e 61 | 4e 73 20 74 61 6b 65 20 |aling Na|Ns take |
|00005e90| 70 72 65 63 65 64 65 6e | 63 65 20 6f 76 65 72 20 |preceden|ce over |
|00005ea0| 71 75 69 65 74 0a 20 20 | 20 20 20 20 20 20 4e 61 |quiet. | Na|
|00005eb0| 4e 73 2e 0a 0a 20 20 20 | 20 20 20 20 20 52 65 74 |Ns... | Ret|
|00005ec0| 75 72 6e 20 30 20 69 66 | 20 6e 65 69 74 68 65 72 |urn 0 if| neither|
|00005ed0| 20 6f 70 65 72 61 6e 64 | 20 69 73 20 61 20 4e 61 | operand| is a Na|
|00005ee0| 4e 2e 0a 0a 20 20 20 20 | 20 20 20 20 73 19 00 00 |N... | s...|
|00005ef0| 00 63 6f 6d 70 61 72 69 | 73 6f 6e 20 69 6e 76 6f |.compari|son invo|
|00005f00| 6c 76 69 6e 67 20 73 4e | 61 4e 73 18 00 00 00 63 |lving sN|aNs....c|
|00005f10| 6f 6d 70 61 72 69 73 6f | 6e 20 69 6e 76 6f 6c 76 |ompariso|n involv|
|00005f20| 69 6e 67 20 4e 61 4e 69 | 00 00 00 00 4e 28 07 00 |ing NaNi|....N(..|
|00005f30| 00 00 52 40 00 00 00 52 | 17 00 00 00 52 44 00 00 |..R@...R|....RD..|
|00005f40| 00 74 07 00 00 00 69 73 | 5f 73 6e 61 6e 52 55 00 |.t....is|_snanRU.|
|00005f50| 00 00 52 07 00 00 00 74 | 07 00 00 00 69 73 5f 71 |..R....t|....is_q|
|00005f60| 6e 61 6e 28 03 00 00 00 | 52 1d 00 00 00 52 70 00 |nan(....|R....Rp.|
|00005f70| 00 00 52 1e 00 00 00 28 | 00 00 00 00 28 00 00 00 |..R....(|....(...|
|00005f80| 00 73 1d 00 00 00 2f 75 | 73 72 2f 6c 69 62 2f 70 |.s..../u|sr/lib/p|
|00005f90| 79 74 68 6f 6e 32 2e 36 | 2f 64 65 63 69 6d 61 6c |ython2.6|/decimal|
|00005fa0| 2e 70 79 74 13 00 00 00 | 5f 63 6f 6d 70 61 72 65 |.pyt....|_compare|
|00005fb0| 5f 63 68 65 63 6b 5f 6e | 61 6e 73 c9 02 00 00 73 |_check_n|ans....s|
|00005fc0| 28 00 00 00 00 0b 0d 01 | 0d 02 14 01 0d 01 09 01 |(.......|........|
|00005fd0| 03 01 08 01 0d 01 09 01 | 03 01 08 01 0d 01 09 01 |........|........|
|00005fe0| 03 01 08 01 0d 01 09 01 | 03 01 0c 01 63 01 00 00 |........|....c...|
|00005ff0| 00 01 00 00 00 02 00 00 | 00 43 00 00 00 73 17 00 |........|.C...s..|
|00006000| 00 00 7c 00 00 69 00 00 | 70 0d 00 01 7c 00 00 69 |..|..i..|p...|..i|
|00006010| 01 00 64 01 00 6a 03 00 | 53 28 02 00 00 00 73 75 |..d..j..|S(....su|
|00006020| 00 00 00 52 65 74 75 72 | 6e 20 54 72 75 65 20 69 |...Retur|n True i|
|00006030| 66 20 73 65 6c 66 20 69 | 73 20 6e 6f 6e 7a 65 72 |f self i|s nonzer|
|00006040| 6f 3b 20 6f 74 68 65 72 | 77 69 73 65 20 72 65 74 |o; other|wise ret|
|00006050| 75 72 6e 20 46 61 6c 73 | 65 2e 0a 0a 20 20 20 20 |urn Fals|e... |
|00006060| 20 20 20 20 4e 61 4e 73 | 20 61 6e 64 20 69 6e 66 | NaNs| and inf|
|00006070| 69 6e 69 74 69 65 73 20 | 61 72 65 20 63 6f 6e 73 |inities |are cons|
|00006080| 69 64 65 72 65 64 20 6e | 6f 6e 7a 65 72 6f 2e 0a |idered n|onzero..|
|00006090| 20 20 20 20 20 20 20 20 | 52 45 00 00 00 28 02 00 | |RE...(..|
|000060a0| 00 00 52 44 00 00 00 52 | 26 00 00 00 28 01 00 00 |..RD...R|&...(...|
|000060b0| 00 52 1d 00 00 00 28 00 | 00 00 00 28 00 00 00 00 |.R....(.|...(....|
|000060c0| 73 1d 00 00 00 2f 75 73 | 72 2f 6c 69 62 2f 70 79 |s..../us|r/lib/py|
|000060d0| 74 68 6f 6e 32 2e 36 2f | 64 65 63 69 6d 61 6c 2e |thon2.6/|decimal.|
|000060e0| 70 79 74 0b 00 00 00 5f | 5f 6e 6f 6e 7a 65 72 6f |pyt...._|_nonzero|
|000060f0| 5f 5f ea 02 00 00 73 02 | 00 00 00 00 05 63 02 00 |__....s.|.....c..|
|00006100| 00 00 08 00 00 00 04 00 | 00 00 43 00 00 00 73 7d |........|..C...s}|
|00006110| 01 00 00 7c 00 00 69 00 | 00 70 0a 00 01 7c 01 00 |...|..i.|.p...|..|
|00006120| 69 00 00 6f 44 00 01 7c | 00 00 69 01 00 83 00 00 |i..oD..||..i.....|
|00006130| 7d 02 00 7c 01 00 69 01 | 00 83 00 00 7d 03 00 7c |}..|..i.|....}..||
|00006140| 02 00 7c 03 00 6a 02 00 | 6f 05 00 01 64 01 00 53 |..|..j..|o...d..S|
|00006150| 01 7c 02 00 7c 03 00 6a | 00 00 6f 05 00 01 64 02 |.|..|..j|..o...d.|
|00006160| 00 53 01 64 03 00 53 6e | 01 00 01 7c 00 00 70 1c |.S.d..Sn|...|..p.|
|00006170| 00 01 7c 01 00 70 05 00 | 01 64 01 00 53 01 64 02 |..|..p..|.d..S.d.|
|00006180| 00 7c 01 00 69 02 00 13 | 0b 53 6e 01 00 01 7c 01 |.|..i...|.Sn...|.|
|00006190| 00 70 0c 00 01 64 02 00 | 7c 00 00 69 02 00 13 53 |.p...d..||..i...S|
|000061a0| 01 7c 01 00 69 02 00 7c | 00 00 69 02 00 6a 00 00 |.|..i..||..i..j..|
|000061b0| 6f 05 00 01 64 02 00 53 | 01 7c 00 00 69 02 00 7c |o...d..S|.|..i..||
|000061c0| 01 00 69 02 00 6a 00 00 | 6f 05 00 01 64 03 00 53 |..i..j..|o...d..S|
|000061d0| 01 7c 00 00 69 03 00 83 | 00 00 7d 04 00 7c 01 00 |.|..i...|..}..|..|
|000061e0| 69 03 00 83 00 00 7d 05 | 00 7c 04 00 7c 05 00 6a |i.....}.|.|..|..j|
|000061f0| 02 00 6f 71 00 01 7c 00 | 00 69 04 00 64 04 00 7c |..oq..|.|.i..d..||
|00006200| 00 00 69 05 00 7c 01 00 | 69 05 00 18 14 17 7d 06 |..i..|..|i.....}.|
|00006210| 00 7c 01 00 69 04 00 64 | 04 00 7c 01 00 69 05 00 |.|..i..d|..|..i..|
|00006220| 7c 00 00 69 05 00 18 14 | 17 7d 07 00 7c 06 00 7c ||..i....|.}..|..||
|00006230| 07 00 6a 02 00 6f 05 00 | 01 64 01 00 53 01 7c 06 |..j..o..|.d..S.|.|
|00006240| 00 7c 07 00 6a 00 00 6f | 0d 00 01 64 02 00 7c 00 |.|..j..o|...d..|.|
|00006250| 00 69 02 00 13 0b 53 01 | 64 02 00 7c 00 00 69 02 |.i....S.|d..|..i.|
|00006260| 00 13 53 6e 26 00 01 7c | 04 00 7c 05 00 6a 04 00 |..Sn&..||..|..j..|
|00006270| 6f 0c 00 01 64 02 00 7c | 00 00 69 02 00 13 53 01 |o...d..||..i...S.|
|00006280| 64 02 00 7c 00 00 69 02 | 00 13 0b 53 64 05 00 53 |d..|..i.|...Sd..S|
|00006290| 28 06 00 00 00 73 b8 00 | 00 00 43 6f 6d 70 61 72 |(....s..|..Compar|
|000062a0| 65 20 74 68 65 20 74 77 | 6f 20 6e 6f 6e 2d 4e 61 |e the tw|o non-Na|
|000062b0| 4e 20 64 65 63 69 6d 61 | 6c 20 69 6e 73 74 61 6e |N decima|l instan|
|000062c0| 63 65 73 20 73 65 6c 66 | 20 61 6e 64 20 6f 74 68 |ces self| and oth|
|000062d0| 65 72 2e 0a 0a 20 20 20 | 20 20 20 20 20 52 65 74 |er... | Ret|
|000062e0| 75 72 6e 73 20 2d 31 20 | 69 66 20 73 65 6c 66 20 |urns -1 |if self |
|000062f0| 3c 20 6f 74 68 65 72 2c | 20 30 20 69 66 20 73 65 |< other,| 0 if se|
|00006300| 6c 66 20 3d 3d 20 6f 74 | 68 65 72 20 61 6e 64 20 |lf == ot|her and |
|00006310| 31 0a 20 20 20 20 20 20 | 20 20 69 66 20 73 65 6c |1. | if sel|
|00006320| 66 20 3e 20 6f 74 68 65 | 72 2e 20 20 54 68 69 73 |f > othe|r. This|
|00006330| 20 72 6f 75 74 69 6e 65 | 20 69 73 20 66 6f 72 20 | routine| is for |
|00006340| 69 6e 74 65 72 6e 61 6c | 20 75 73 65 20 6f 6e 6c |internal| use onl|
|00006350| 79 2e 69 00 00 00 00 69 | ff ff ff ff 69 01 00 00 |y.i....i|....i...|
|00006360| 00 52 45 00 00 00 4e 28 | 06 00 00 00 52 44 00 00 |.RE...N(|....RD..|
|00006370| 00 52 6e 00 00 00 52 25 | 00 00 00 74 08 00 00 00 |.Rn...R%|...t....|
|00006380| 61 64 6a 75 73 74 65 64 | 52 26 00 00 00 52 43 00 |adjusted|R&...RC.|
|00006390| 00 00 28 08 00 00 00 52 | 1d 00 00 00 52 70 00 00 |..(....R|....Rp..|
|000063a0| 00 74 08 00 00 00 73 65 | 6c 66 5f 69 6e 66 74 09 |.t....se|lf_inft.|
|000063b0| 00 00 00 6f 74 68 65 72 | 5f 69 6e 66 74 0d 00 00 |...other|_inft...|
|000063c0| 00 73 65 6c 66 5f 61 64 | 6a 75 73 74 65 64 74 0e |.self_ad|justedt.|
|000063d0| 00 00 00 6f 74 68 65 72 | 5f 61 64 6a 75 73 74 65 |...other|_adjuste|
|000063e0| 64 74 0b 00 00 00 73 65 | 6c 66 5f 70 61 64 64 65 |dt....se|lf_padde|
|000063f0| 64 74 0c 00 00 00 6f 74 | 68 65 72 5f 70 61 64 64 |dt....ot|her_padd|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.